Beispiel #1
0
        private Form createForm(string name)
        {
            Form form = null;

            switch (name)
            {
            case "goods":
                form = new GoodsForm();
                break;

            case "customers":
                form = new CustomerForm();
                break;

            case "invoices":
                form             = new InvoiceForm();
                ChangeRangeDate += delegate(object sender)
                {
                    ((InvoiceForm)form).LoadInvoicesData();
                };

                break;
            }
            return(form);
        }
Beispiel #2
0
        private void btnChooseProduct_Click(object sender, EventArgs e)
        {
            GoodsForm goodsForm = new GoodsForm();

            if (goodsForm.ShowDialog() == DialogResult.OK)
            {
                InvoiceLine.PRODUCT_ID = goodsForm.CurrentProduct.PRODUCT_ID;
                edtProduct.Text        = goodsForm.CurrentProduct.NAME;
                edtPrice.Text          = goodsForm.CurrentProduct.PRICE.ToString("F2");
            }
        }