private void btnEditPQRepo_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { if (this.IOTGridView.GetFocusedRow() is ItenaryofTravels item) { frmAddEditIOT frm = new frmAddEditIOT(MethodType.Edit, item); frm.ShowDialog(); Init(); } }
private void btnNew_Click(object sender, EventArgs e) { frmAddEditIOT frm = new frmAddEditIOT(Models.MethodType.Add, new Models.ItenaryofTravels() { OBRId = this.obrId, DateCreated = DateTime.Now }); frm.ShowDialog(); }