private void btn_Ok_Click(object sender, EventArgs e) { CurrentTransaction_DB cTR = new CurrentTransaction_DB(); int price = cTR.getprice(cBox_Item.Text); int paid = price * (Convert.ToInt32(cBox_Quantity.Text)); cTR.Item = cBox_Item.Text; cTR.Quantity = cBox_Quantity.Text; cTR.Price = price.ToString(); cTR.PayPrice = paid.ToString(); cTR.addtransaction(cTR); // dataGridView1.AutoGenerateColumns = true; //cTR.FillGrid(dataGridView1); sum = sum + paid; lbl_ShowBill.Text = sum.ToString(); }
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(); }