private void applyCreditToolStripMenuItem_Click(object sender, EventArgs e) { var claimantChoose = new Accounting.Invoice.claimantSelectViewForm(); claimantChoose.ShowDialog(); if (claimantChoose.DialogResult == DialogResult.OK) { var newCreditApplyForm = new Accounting.Credit.addCreditViewForm(claimantChoose.myClaimant); newCreditApplyForm.ShowDialog(); newCreditApplyForm.Dispose(); } claimantChoose.Dispose(); }
private void multipleReceiptsToolStripMenuItem_Click(object sender, EventArgs e) { var claimantChoose = new Accounting.Invoice.claimantSelectViewForm(); claimantChoose.ShowDialog(); if (claimantChoose.DialogResult == DialogResult.OK) { var newDateInterval = new Report.dateIntervalDialog(); newDateInterval.ShowDialog(); if (newDateInterval.DialogResult == DialogResult.OK) { var newReceiptForm = new Accounting.Receipt.receiptViewForm(claimantChoose.myClaimant); newReceiptForm.removeBtnEvent(); newReceiptForm.okBtn.Click += new EventHandler(receiptOkBtnClick); newReceiptForm.IsMulti = true; newReceiptForm.ShowDialog(); if (newReceiptForm.DialogResult == DialogResult.OK) { var foo = new Accounting.Receipt.multiReceiptViewForm(claimantChoose.myClaimant, newDateInterval.startDate, newDateInterval.endDate, newReceiptForm.myReceipt, newReceiptForm.myPaymentLines); foo.ShowDialog(); foo.Dispose(); newReceiptForm.Dispose(); } else { newReceiptForm.Dispose(); } } newDateInterval.Dispose(); } claimantChoose.Dispose(); }
private void cancelInvoiceToolStripMenuItem_Click(object sender, EventArgs e) { if (staticProperties.userLevel == 1) { var claimantChoose = new Accounting.Invoice.claimantSelectViewForm(); claimantChoose.ShowDialog(); if (claimantChoose.DialogResult == DialogResult.OK) { var newDateInterval = new Report.dateIntervalDialog(); newDateInterval.ShowDialog(); if (newDateInterval.DialogResult == DialogResult.OK) { var foo = new Accounting.Invoice.cancellInvoiceViewForm(claimantChoose.myClaimant, newDateInterval.startDate, newDateInterval.endDate); foo.ShowDialog(); foo.Dispose(); } newDateInterval.Dispose(); } claimantChoose.Dispose(); } else { MessageBox.Show("General user can not access this function."); } }
private void invoiceByClaimantToolStripMenuItem_Click(object sender, EventArgs e) { var claimantChoose = new Accounting.Invoice.claimantSelectViewForm(); claimantChoose.ShowDialog(); if (claimantChoose.DialogResult == DialogResult.OK) { var newDateInterval = new Report.dateIntervalDialog(); newDateInterval.ShowDialog(); if (newDateInterval.DialogResult == DialogResult.OK) { var foo = new Claimant.claimantInvoiceViewForm(claimantChoose.myClaimant, newDateInterval.startDate, newDateInterval.endDate); foo.ShowDialog(); foo.Dispose(); } newDateInterval.Dispose(); } claimantChoose.Dispose(); }
//When making a blank invoice. public void chooseClaimant() { myClaimantSelectForm = new claimantSelectViewForm(); myClaimantSelectForm.ShowDialog(); if (myClaimantSelectForm.DialogResult == DialogResult.OK) { myClaimant = myClaimantSelectForm.myClaimant; this.newInvoice(); myClaimantSelectForm.Dispose(); } }