예제 #1
0
        private void ledgerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmInvoice f = new frmInvoice();

            f.MdiParent = this;
            f.Show();
        }
예제 #2
0
        private void purchaseInvoiceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmInvoice frmInvoice = new frmInvoice();

            frmInvoice.MdiParent = this;
            frmInvoice.Show();
        }
예제 #3
0
        private void deliveryNoteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmInvoice obj = new frmInvoice();

            obj.MdiParent = this;
            obj.Show();
        }
예제 #4
0
        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);
            }
        }
예제 #5
0
        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");
            }
        }
예제 #6
0
        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();
            }
        }
예제 #7
0
        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();
            }
        }
예제 #8
0
        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();
            }
        }
예제 #9
0
파일: frmMain.cs 프로젝트: votrongdao/PEIMS
 private void invoiceFormToolStripMenuItem_Click_1(object sender, EventArgs e)
 {
     frmInvoice f = new frmInvoice();
     f.MdiParent = this;
     f.Show();
 }