private void btnNew_Click(object sender, EventArgs e) { frmAddEditPIS frm = new frmAddEditPIS(MethodType.Add, new PIS() { PRId = purchaseRequests.Id }); frm.ShowDialog(); Init(); }
private void btnEditPQRepo_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { try { if (PISGridView.GetFocusedRow() is PIS item) { UnitOfWork unitOfWork = new UnitOfWork(); frmAddEditPIS frm = new frmAddEditPIS(MethodType.Edit, item); frm.ShowDialog(); Init(); } } catch (Exception exception) { } }