protected override void OnSetSqlParameters(GtidParameterCollection sqlParams) { sqlParams.Clear(); sqlParams.AddWithValue("@FromDate", dtTuNgay.Value.Date); sqlParams.AddWithValue("@ToDate", dtDenNgay.Value.Date.AddHours(24)); sqlParams.AddWithValue("@IdTrungTam", cboTrungTam.SelectedValue); sqlParams.AddWithValue("@IdKho", cboKho.SelectedValue); sqlParams.AddWithValue("@IdSanPham", cboSanPham.SelectedValue); if (ut.isStringNotEmpty(txtTenSanPham.Text)) { sqlParams.AddWithValue("@SanPham", txtTenSanPham.Text); } }
protected override void OnSetSqlParameters(GtidParameterCollection sqlParams) { if (cboNgayDuDau.SelectedValue != null) { sqlParams.AddWithValue("@ThoiGian", cboNgayDuDau.SelectedValue).Direction = ParameterDirection.Input; } if (cboTrungTam.SelectedValue != null && int.Parse(cboTrungTam.SelectedValue.ToString()) != 0) { sqlParams.AddWithValue("@IdTrungTam", cboTrungTam.SelectedValue).Direction = ParameterDirection.Input; } if (cboKho.SelectedValue != null && int.Parse(cboKho.SelectedValue.ToString()) != 0) { sqlParams.AddWithValue("@IdKho", cboKho.SelectedValue).Direction = ParameterDirection.Input; } if (ut.isStringNotEmpty(txtTenSanPham.Text)) { sqlParams.AddWithValue("@SanPham", txtTenSanPham.Text).Direction = ParameterDirection.Input; } }
virtual protected void OnSetSqlParameters(GtidParameterCollection sqlParams) { throw new Exception("The override of OnSetSqlParameters function with parameter collection is not implemented."); }