Exemplo n.º 1
0
        static SalesNew()
        {
            dsAddSale = new EmmasDataSet();
            receiptTableAdapter    daReceipt   = new receiptTableAdapter();
            orderLineTableAdapter  daOrderLine = new orderLineTableAdapter();
            salesInvenTableAdapter daInventory = new salesInvenTableAdapter();

            try
            {
                daReceipt.Fill(dsAddSale.receipt);
                daOrderLine.Fill(dsAddSale.orderLine);
                daInventory.Fill(dsAddSale.salesInven);
            }
            catch { }
        }
Exemplo n.º 2
0
        static salesUpdate()
        {
            //load data at the beginning of the session
            dsEmma = new EmmasDataSet();
            receiptTableAdapter      daReceipt   = new receiptTableAdapter();
            orderLineTableAdapter    daOrderLine = new orderLineTableAdapter();
            orderProductTableAdapter daInventory = new orderProductTableAdapter();

            try
            {
                daReceipt.Fill(dsEmma.receipt);
                daOrderLine.Fill(dsEmma.orderLine);
                daInventory.Fill(dsEmma.orderProduct);
            }
            catch { }
        }
Exemplo n.º 3
0
        private void Save()
        {
            receiptTableAdapter   daReceipt   = new receiptTableAdapter();
            orderLineTableAdapter daOrderLine = new orderLineTableAdapter();

            try
            {
                daReceipt.Update(dsEmma.receipt);
                daOrderLine.Update(dsEmma.orderLine);
                dsEmma.AcceptChanges();
                this.lblSave.Text = "Sale has been updated successfully.";
            }
            catch
            {
                dsEmma.RejectChanges();
                this.lblSave.Text = "Unable to add sale - All changes have been rejected.";
            }
        }
Exemplo n.º 4
0
        private void Save()
        {
            receiptTableAdapter   daReceipt   = new receiptTableAdapter();
            orderLineTableAdapter daOrderLine = new orderLineTableAdapter();

            try
            {
                daReceipt.Update(dsAddSale.receipt);
                daOrderLine.Update(dsAddSale.orderLine);
                dsAddSale.AcceptChanges();
                this.lblSave.Text = "Sale has been added successfully.";
                ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + "Sale has been added successfully." + "');", true);
            }
            catch
            {
                dsAddSale.RejectChanges();
                this.lblSave.Text = "Unable to add sale - All changes have been rejected.";
                ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + "Unable to add sale - All changes have been rejected." + "');", true);
            }
        }