private void btnNewAccount_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (!MspTool.PermissionControl(AppMain.User.username, SecRightType.Insert, (int)DocumentType.InvoiceList, AppMain.CompanyRecId)) { return; } InvoiceEdit frm = new InvoiceEdit(); frm.MdiParent = this.MdiParent; frm.invoice = invoice; frm._FormOpenType = FormOpenType.New; frm.RecId = 0; frm.Show(); }
private void do_edit() { if (!MspTool.PermissionControl(AppMain.User.username, SecRightType.Update, (int)DocumentType.InvoiceList, AppMain.CompanyRecId)) { return; } InvoiceOwnerDTO oRow = (InvoiceOwnerDTO)gcv_Invoice.GetFocusedRow(); if (oRow != null) { InvoiceEdit frm = new InvoiceEdit(); frm.MdiParent = this.MdiParent; frm.invoice = invoice; frm._FormOpenType = FormOpenType.Edit; frm.RecId = oRow.RecId; frm.Show(); } }