private void Registros_gridView_Click(object sender, EventArgs e) { var gridView = Registros_gridView; Point clickPoint = gridControl1.PointToClient(MousePosition); var hitInfo = gridView.CalcHitInfo(clickPoint); if (hitInfo.InRowCell) { int rowHandle = hitInfo.RowHandle; GridColumn column = hitInfo.Column; ControlClientes control = (ControlClientes)Registros_gridView.GetRow(rowHandle); AControlClientesId = control.ControlClienteID; if (column == Edit_gridColumn) { EditClienteXtraForm editClienteXtraForm = new EditClienteXtraForm(control); if (editClienteXtraForm.ShowDialog() != DialogResult.Abort) { //int cubaPaisId = Paises.PaisIdDeCuba; //ControlClientesbindingSource.DataSource = new NegocioDataContext().ControlClientes.Where(c => VisualizandoNacional ? c.PaisId == cubaPaisId : c.PaisId != cubaPaisId); AGlobalDataContext = new NegocioDataContext(); PopulaRegistros(Nacional_checkButton.Checked); } } } }
public ControlClientes GetContratoSelecionado() { if (Registros_gridView.GetSelectedRows().Any()) { var contrato = (ControlClientes)Registros_gridView.GetRow(Registros_gridView.GetSelectedRows()[0]); return(contrato); } return(null); }
private void Registros_gridView_DoubleClick(object sender, EventArgs e) { int rowHandle; var column = GetClickedInformation(gridControl1, Registros_gridView, out rowHandle); ControlClientes cliente = (ControlClientes)Registros_gridView.GetRow(rowHandle); EditClienteXtraForm editClienteXtraForm = new EditClienteXtraForm(cliente); //splashScreenManager1.ShowWaitForm(); if (editClienteXtraForm.ShowDialog() == DialogResult.Cancel) { return; } //_GlobalDataContext.Refresh(RefreshMode.OverwriteCurrentValues,_Ot); ActualizaDatos(); }