private void EditButton_Click(object sender, EventArgs e) { try { HPS.BLL.InfractionBLL.BLLInfraction_TKeys InfractionKey = new HPS.BLL.InfractionBLL.BLLInfraction_TKeys(); InfractionKey.InfractionID_int = (Int32)this.InfractionGridView.CurrentRow.Cells["colInfractionID_int"].Value; HPS.BLL.InfractionBLL.BLLInfraction_TFactory InfractionFactory = new HPS.BLL.InfractionBLL.BLLInfraction_TFactory(); HPS.BLL.InfractionBLL.BLLInfraction_T InfractionEntity = InfractionFactory.GetBy(InfractionKey); if (!string.IsNullOrEmpty(InfractionEntity.RegisterUserName_nvc) && !string.IsNullOrEmpty(InfractionEntity.RegisterDate_nvc)) { registered = true; } InfractionEntityForm Infraction = new InfractionEntityForm(BaseEntityForm1.enmState.Edit, (DataTable)this.InfractionGridView.DataSource, InfractionKey, registered); Infraction.ShowDialog(); } catch (Exception ex) { Hepsa.Core.Common.MessageBox.ErrorMessage(ex.Message); } }
private void NewButton_Click(object sender, EventArgs e) { InfractionEntityForm Infraction = new InfractionEntityForm((DataTable)this.InfractionGridView.DataSource); Infraction.ShowDialog(); }