private void load_data_2_grid_search(string ip_str_ma_dot_tt, string ip_str_so_hd, decimal ip_dc_id_trang_thai_tt) { US_V_GD_THANH_TOAN v_us_gd_thanh_toan = new US_V_GD_THANH_TOAN(); DS_V_GD_THANH_TOAN v_ds_gd_thanh_toan = new DS_V_GD_THANH_TOAN(); decimal v_dc_id_hdong = get_id_by_so_hop_dong(ip_str_so_hd); if (v_dc_id_hdong == 0) { m_lbl_thong_bao.Visible = true; m_lbl_thong_bao.Text = "Không có thanh toán nào phù hợp"; m_grv_danh_sach_du_toan.Visible = false; return; } v_us_gd_thanh_toan.f403_load_thanh_toan_by_ma_dot_tt_va_trang_thai_tt_va_id_hd_khung(ip_str_ma_dot_tt, ip_dc_id_trang_thai_tt, v_dc_id_hdong, v_ds_gd_thanh_toan); //// Nếu ko search theo trạng thái thanh toán //if (ip_dc_id_trang_thai_tt == 0) // v_us_gd_thanh_toan.FillDataset(v_ds_gd_thanh_toan, " WHERE SO_PHIEU_THANH_TOAN = '" + ip_str_ma_dot_tt + "' AND ID_HOP_DONG_KHUNG = " + v_dc_id_hdong); //else // // Số phiếu thanh toán là mã đợt thanh toán // v_us_gd_thanh_toan.FillDataset(v_ds_gd_thanh_toan, " WHERE SO_PHIEU_THANH_TOAN = '" + ip_str_ma_dot_tt + "' AND ID_HOP_DONG_KHUNG = " + v_dc_id_hdong + " AND ID_TRANG_THAI_THANH_TOAN = " + ip_dc_id_trang_thai_tt); if (v_ds_gd_thanh_toan.V_GD_THANH_TOAN.Rows.Count == 0) { m_lbl_thong_bao.Visible = true; m_lbl_thong_bao.Text = "Không có thanh toán nào phù hợp"; } m_grv_danh_sach_du_toan.Visible = true; m_grv_danh_sach_du_toan.DataSource = v_ds_gd_thanh_toan.V_GD_THANH_TOAN; m_grv_danh_sach_du_toan.DataBind(); }