1 -
private void gridViewMasivo_RowCellClick(object sender, RowCellClickEventArgs e)
{
GridView view = sender as GridView;
if (e.Column== view.Columns["ImporteNeto"])
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
{
int NumCol = 0;
NumCol = e.Column.VisibleIndex;
string CodEmp = view.GetRowCellDisplayText(e.RowHandle, view.Columns["CodigoEmpresa"]);
string CodCart = view.GetRowCellDisplayText(e.RowHandle, view.Columns["CodigoCartera"]);
string CodTipoDiv = view.GetRowCellDisplayText(e.RowHandle, view.Columns["TipoDividendo"]);
int NroDiv = Convert.ToInt32(view.GetRowCellDisplayText(e.RowHandle, view.Columns["NroDividendo"]));
string CodAgente = view.GetRowCellDisplayText(e.RowHandle, view.Columns["CodigoAgente"]);
string CodAcc = view.GetRowCellDisplayText(e.RowHandle, view.Columns["CodigoAccionista"]);
string SimM = view.GetRowCellDisplayText(e.RowHandle, view.Columns["SimboloMoneda"]);
BuscarDividendoCalculadoResponse ListaDetalleImportes = new BuscarDividendoCalculadoResponse();
ListaDetalleImportes = DividendoManager.Instance.ListarDetalleImportesDividendo(CodEmp, CodCart, CodTipoDiv, NroDiv, CodAgente, CodAcc);
DXPopupMenu menu = new DXPopupMenu();
menu = CreateMenu(Convert.ToDecimal(ListaDetalleImportes.ImporteBruto), Convert.ToDecimal(ListaDetalleImportes.ImporteRetencion), Convert.ToDecimal(ListaDetalleImportes.ImporteNeto),SimM);
UserLookAndFeel lf = UserLookAndFeel.Default;
((IDXDropDownControl)menu).Show(new SkinMenuManager(lf), gridControlMasivo, PointToClient(MousePosition));
}
}
}
#region :.Popup.:
DXPopupMenu CreateMenu(decimal ImB,decimal ImR,decimal ImN,string SimM)
{
string datos = "Importe Bruto: " +SimM+ String.Format("{0:###,###,###,##0.00}",ImB) + "\nImporte Retención: " + SimM+String.Format("{0:###,###,###,##0.00}",ImR) + "\nImporte Neto: " +SimM+ String.Format("{0:###,###,###,##0.00}",ImN);
DXPopupMenu menu = new DXPopupMenu();
DXMenuItem item = new DXMenuItem(datos);
menu.Items.Add(item);
return menu;
}
#endregion