private void BtnEditPQRepo_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { if (uCPQ.PQGridView.GetFocusedRow() is PriceQuotations pq) { frmAddEditPQ frm = new frmAddEditPQ(MethodType.Edit, pq); frm.ShowDialog(); ((ILoad <PriceQuotations>) this).Init(); } }
public LoadAddEditPQ(frmAddEditPQ frmAddEditPQ, PriceQuotations priceQuotations) { this.frmAddEditPQ = frmAddEditPQ; this.priceQuotations = priceQuotations; frmAddEditPQ.btnSave.Click += BtnSave_Click; frmAddEditPQ.btnAddItems.Click += BtnAddItems_Click; frmAddEditPQ.btnDeleteItemRepo.ButtonClick += BtnDeleteItemRepo_ButtonClick; frmAddEditPQ.ItemsGridView.RowUpdated += ItemsGridView_RowUpdated; frmAddEditPQ.txtPGSOfficer.EditValueChanged += TxtPGSOfficer_EditValueChanged; }
private void BtnNew_Click(object sender, EventArgs e) { frmAddEditPQ frm = new frmAddEditPQ(MethodType.Add, new PriceQuotations() { PRId = pr.Id }); frm.ShowDialog(); ((ILoad <PriceQuotations>) this).Init(); }