private void AllPaymentsToolStripMenuItem_Click(object sender, EventArgs e) { Documents.PaymentsList form = new Documents.PaymentsList(null); bool allowed = Compas.Logic.Security.CurrentSecurityContext.Principal.OpperationAllowed(form.Name); if (allowed == true) { form.MdiParent = this; form.Show(); } else { MessageBox.Show("Дія заборонена. Зверніться до адміністратора."); } }
private void PaymentsSB_Click(object sender, EventArgs e) { int?documentId = null; if (DataGV.SelectedRows.Count > 0) { documentId = Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value); } PaymentsList form = new PaymentsList(documentId); form.WindowState = FormWindowState.Maximized; form.ShowDialog(); manager.Save(); manager.CloseContext(); manager = new ContextManager(); Fill(); }
private void PaymentsSB_Click(object sender, EventArgs e) { int? documentId = null; if (DataGV.SelectedRows.Count > 0) { documentId = Convert.ToInt32(DataGV.SelectedRows[0].Cells["ID"].Value); } PaymentsList form = new PaymentsList(documentId); form.WindowState = FormWindowState.Maximized; form.ShowDialog(); manager.Save(); manager.CloseContext(); manager = new ContextManager(); Fill(); }