private void txtIdSearch_ButtonClick(object sender, EventArgs e) { string sql = "select * from sale where id like'%" + this.txtIdSearch.Text + "%'"; this.dgvSale.AutoGenerateColumns = false; this.dgvSale.DataSource = SRepo.GetAll(sql).ToList(); this.dgvSale.ClearSelection(); this.dgvSale.Refresh(); }
private void PopulateGridView() { this.dgvSale.AutoGenerateColumns = false; this.dgvSale.DataSource = SRepo.GetAll().ToList(); this.dgvSale.ClearSelection(); this.dgvSale.Refresh(); this.lblTotalSale.Text = "Total Sale : " + SRepo.CalculateTotalPrice().ToString() + " Taka"; SRepo.calculateTotalPrice = 0; }