private void superGridControl1_CellMouseDown(object sender, DevComponents.DotNetBar.SuperGrid.GridCellMouseEventArgs e) { CmcsBuyFuelTransport entity = Dbers.GetInstance().SelfDber.Get <CmcsBuyFuelTransport>(superGridControl1.PrimaryGrid.GetCell(e.GridCell.GridRow.Index, superGridControl1.PrimaryGrid.Columns["clmId"].ColumnIndex).Value.ToString()); switch (superGridControl1.PrimaryGrid.Columns[e.GridCell.ColumnIndex].Name) { case "clmShow": FrmWeightCar_Oper frmShow = new FrmWeightCar_Oper(entity.Id, false); if (frmShow.ShowDialog() == DialogResult.OK) { BindData(); } break; case "clmDeDuc": FrmWeightCar_DeDuc frmDeDuc = new FrmWeightCar_DeDuc(entity.Id, false); if (frmDeDuc.ShowDialog() == DialogResult.Cancel) { BindData(); } break; case "clmAlert": FrmWeightCar_Alert frmAlert = new FrmWeightCar_Alert(entity.Id, false); if (frmAlert.ShowDialog() == DialogResult.OK) { BindData(); } break; } }
private void dataGridViewX1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == -1 || e.RowIndex == -1) { return; } CmcsBuyFuelTransport entity = Dbers.GetInstance().SelfDber.Get <CmcsBuyFuelTransport>(superGridControl1.PrimaryGrid.GetCell(e.ColumnIndex, superGridControl1.PrimaryGrid.Columns["clmId"].ColumnIndex).Value.ToString()); if (entity == null) { return; } switch (superGridControl1.PrimaryGrid.Columns[e.ColumnIndex].Name) { case "clmShow": FrmWeightCar_Oper frmShow = new FrmWeightCar_Oper(entity.Id, false); if (frmShow.ShowDialog() == DialogResult.OK) { BindData(); } break; } }