Ejemplo n.º 1
0
        private void btn_Submit_Click(object sender, EventArgs e)
        {
            CurrentTransaction_DB cTR = new CurrentTransaction_DB();
            Transaction_DB        tr  = new Transaction_DB();
            int price = cTR.getprice(cBox_Item.Text);
            int paid  = price * (Convert.ToInt32(cBox_Quantity.Text));

            sum = sum + paid;

            tr.CustomerName = txt_Name.Text;
            tr.Mobile       = txt_Mobile.Text;
            tr.PurchaseDate = lbl_ShowDate.Text;
            tr.TotalBill    = sum.ToString();
            tr.addtransaction(tr);
            Bill b = new Bill();

            b.label5.Text = tr.CustomerName;
            b.label6.Text = tr.Mobile;
            b.label7.Text = tr.PurchaseDate;
            b.label8.Text = tr.TotalBill;
            b.Show();
            cTR.empty();
        }