private void load_data_grv_detail(decimal ip_id_trang_thai) { decimal v_id_trung_tam = CIPConvert.ToDecimal(m_hdf_id_trung_tam.Value); US_V_DM_BILL v_us_v_dm_bill = new US_V_DM_BILL(); DS_V_DM_BILL v_ds_v_dm_bill = new DS_V_DM_BILL(); v_ds_v_dm_bill.Clear(); if (ip_id_trang_thai == CONST_ID_TRANG_THAI_THU.ID_DA_NHAN_NOI_BO || ip_id_trang_thai == CONST_ID_TRANG_THAI_THU.ID_DA_CHUYEN_CPN) { v_us_v_dm_bill.FillDataset(v_ds_v_dm_bill, v_id_trung_tam, CIPConvert.ToDatetime(m_txt_tu_ngay.Text), CIPConvert.ToDatetime(m_txt_den_ngay.Text), ip_id_trang_thai, "", m_txt_nguoi_gui_tk.Text.Trim()); } if (ip_id_trang_thai == CONST_ID_TRANG_THAI_THU.ID_BI_TRA_LAI_MAT_PHI) { v_us_v_dm_bill.Fill_DS_BAO_CAO_TONG_HOP_BILL_BI_TRA_LAI_MAT_PHI_WEB_DETAIL(v_ds_v_dm_bill, v_id_trung_tam, CIPConvert.ToDatetime(m_txt_tu_ngay.Text), CIPConvert.ToDatetime(m_txt_den_ngay.Text), m_txt_nguoi_gui_tk.Text.Trim()); } if (ip_id_trang_thai == CONST_ID_TRANG_THAI_THU.ID_BI_TRA_LAI_KHONG_MAT_PHI) { v_us_v_dm_bill.Fill_DS_BAO_CAO_TONG_HOP_BILL_BI_TRA_LAI_KHONG_MAT_PHI_WEB_DETAIL(v_ds_v_dm_bill, v_id_trung_tam, CIPConvert.ToDatetime(m_txt_tu_ngay.Text), CIPConvert.ToDatetime(m_txt_den_ngay.Text), m_txt_nguoi_gui_tk.Text.Trim()); } m_grv_detail.DataSource = v_ds_v_dm_bill.V_DM_BILL; string v_str_thong_tin = "Danh sách Có " + v_ds_v_dm_bill.V_DM_BILL.Rows.Count + " Bill"; m_lbl_grv_detail.Text = v_str_thong_tin; m_grv_detail.DataBind(); if (!m_hdf_id_bill.Value.Equals("")) { m_grv_detail.SelectedIndex = -1; for (int i = 0; i < m_grv_detail.Rows.Count; i++) if (CIPConvert.ToDecimal(m_grv_detail.DataKeys[i].Value) == CIPConvert.ToDecimal(m_hdf_id_bill.Value)) m_grv_detail.SelectedIndex = i; } if (v_ds_v_dm_bill.V_DM_BILL.Count == 0) thong_bao("Không tìm thấy Bill!", true); }
private void load_data_to_grid() { decimal v_id_trung_tam = CIPConvert.ToDecimal(m_hdf_id_trung_tam.Value); decimal v_dc_id_trang_thai = CIPConvert.ToDecimal(m_cbo_trang_thai.SelectedValue); string v_str_tu_khoa = m_txt_tim_kiem.Text.Trim(); US_V_DM_BILL v_us_v_dm_bill = new US_V_DM_BILL(); DS_V_DM_BILL v_ds_v_dm_bill = new DS_V_DM_BILL(); v_ds_v_dm_bill.Clear(); v_us_v_dm_bill.FillDataset(v_ds_v_dm_bill, v_id_trung_tam, CIPConvert.ToDatetime(m_txt_tu_ngay.Text), CIPConvert.ToDatetime(m_txt_den_ngay.Text), v_dc_id_trang_thai, v_str_tu_khoa); m_grv_v_dm_bill.DataSource = v_ds_v_dm_bill.V_DM_BILL; string v_str_thong_tin = " (Có " + v_ds_v_dm_bill.V_DM_BILL.Rows.Count + " bản ghi)"; m_lbl_thong_tim_grv_dm_bill.Text = v_str_thong_tin; m_grv_v_dm_bill.DataBind(); if (!m_hdf_id_bill.Value.Equals("")) { m_grv_v_dm_bill.SelectedIndex = -1; for (int i = 0; i < m_grv_v_dm_bill.Rows.Count; i++) if (CIPConvert.ToDecimal(m_grv_v_dm_bill.DataKeys[i].Value) == CIPConvert.ToDecimal(m_hdf_id_bill.Value)) m_grv_v_dm_bill.SelectedIndex = i; } if (v_ds_v_dm_bill.V_DM_BILL.Count == 0) thong_bao("Không tìm thấy Bill!",true); }