private void FrmSaleRecord_Load(object sender, EventArgs e) { SaleRecordBLL bll = new SaleRecordBLL(); gvSaleRecord.DataSource = bll.GetAllCash(); lblTotal.Text = Total().ToString("#,###,##0"); }
private void BtnSettle_Click(object sender, EventArgs e) { bool result = SaleRecordBLL.AddCash(lstvCart, lblUser.Text, txtPayment.Text, txtBill.Text); if (result) { MessageBox.Show("Successfully saved" + "\nYour Change is: " + txtChange.Text, "Record", MessageBoxButtons.OK, MessageBoxIcon.Information); lstvCart.Items.Clear(); try { txtChange.Text = (-double.Parse(txtBill.Text) + double.Parse(txtPayment.Text)).ToString(); } catch { } } }
private void TxtSearch_TextChanged(object sender, EventArgs e) { SaleRecordBLL bll = new SaleRecordBLL(); gvSaleRecord.DataSource = bll.Search(txtSearch.Text); }