private void ledgerToolStripMenuItem_Click(object sender, EventArgs e) { frmInvoice f = new frmInvoice(); f.MdiParent = this; f.Show(); }
private void purchaseInvoiceToolStripMenuItem_Click(object sender, EventArgs e) { frmInvoice frmInvoice = new frmInvoice(); frmInvoice.MdiParent = this; frmInvoice.Show(); }
private void deliveryNoteToolStripMenuItem_Click(object sender, EventArgs e) { frmInvoice obj = new frmInvoice(); obj.MdiParent = this; obj.Show(); }
void AddCommisionItems1_Click(object sender, EventArgs e) { try { if (grdLister.CurrentRow != null && grdLister.CurrentRow is GridViewDataRowInfo) { int id = grdLister.CurrentRow.Cells["Id"].Value.ToInt(); frmInvoice frm = new frmInvoice(id); DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("frmInvoice1"); if (doc != null) { doc.Close(); } MainMenuForm.MainMenuFrm.ShowForm(frm); //if (AppVars.listUserRights.Count(c => c.formName == "frmDriverCommision") > 0) //{ // frmDriverCommision frm = new frmDriverCommision(id); // DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("frmDriverCommision1"); // if (doc != null) // { // doc.Close(); // } // MainMenuForm.MainMenuFrm.ShowForm(frm); //} //else //{ // frmDriverCommissionDebitCredit frm = new frmDriverCommissionDebitCredit(id); // DockWindow doc = UI.MainMenuForm.MainMenuFrm.GetDockByName("frmDriverCommissionDebitCredit1"); // if (doc != null) // { // doc.Close(); // } // MainMenuForm.MainMenuFrm.ShowForm(frm); //} } } catch (Exception ex) { ENUtils.ShowMessage(ex.Message); } }
public void CalculationTest() { frmInvoice objinvoice = new frmInvoice(); try { objinvoice.Calculation(); } catch (NullReferenceException e) { // Assert StringAssert.Contains(e.Message, "Unit test fail for method Calaulation of form frmInvoice"); } }
private void grid_print_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { string code = grid_print.Rows[e.RowIndex].Cells[e.ColumnIndex + 1].Value.ToString(); DialogResult rs = MessageBox.Show("Do you wish to continue...?", "Print Invoice", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rs == DialogResult.No) { return; } frmInvoice frm = new frmInvoice(code); frm.ShowDialog(); grid_print.DataSource = invoice.GetInvoicePrint(); grid_dispatch.DataSource = invoice.GetDispatchPrint(); } }
private void barbtnInvoice_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Form invoiceListForm = this.checkExist(typeof(frmInvoice)); if (invoiceListForm != null) { invoiceListForm.Activate(); } else { //create new one invoiceListForm = new frmInvoice(); invoiceListForm.MdiParent = this; //set fill parent invoiceListForm.Dock = DockStyle.Fill; //turn off border style invoiceListForm.FormBorderStyle = FormBorderStyle.None; //show invoiceListForm.Show(); } }
private void Invoice() { //local variable to store result DialogResult dr; //accept response dr = MessageBox.Show("Are you sure you want to Proceed?", "Confirm Order", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); //if yes close program if (dr == DialogResult.No) { //Find frmInvoice frmInvoice sw = new frmInvoice(); //hide frmpizza this.Hide(); //show frminvoice sw.show(); } }
private void invoiceFormToolStripMenuItem_Click_1(object sender, EventArgs e) { frmInvoice f = new frmInvoice(); f.MdiParent = this; f.Show(); }