private void LoadDL() { DataAccessHelper db = new DataAccessHelper(); SqlCommand cmd = db.Command("LOAD_DGV_BCVTPT"); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@THANG", Convert.ToInt32(cboThang.Text)); cmd.Parameters.AddWithValue("@NAM", Convert.ToInt32(txtNam.Text)); SqlDataAdapter da = new SqlDataAdapter(cmd); db.dt = new System.Data.DataTable(); da.Fill(db.dt); dgvBC_VTPT.DataSource = db.dt; }
private void LoadDL_TDT() { DataAccessHelper db = new DataAccessHelper(); SqlCommand cmd = db.Command("LOAD_TDT_BCDS"); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@THANG", Convert.ToInt32(cboThang.Text)); cmd.Parameters.AddWithValue("@NAM", Convert.ToInt32(txtNam.Text)); SqlDataAdapter da = new SqlDataAdapter(cmd); db.dt = new System.Data.DataTable(); da.Fill(db.dt); txtTongDoanhThu.DataBindings.Add("Text", db.dt, "TongDoanhThu"); }