private void RefreshDataSource() { Business.CNVC.CNVC_QHGiaDinh qhegiadinh = new Business.CNVC.CNVC_QHGiaDinh(); qhegiadinh.MaNV = Program.selected_ma_nv; dtDSQHeGiaDinh = qhegiadinh.GetData(); PrepareDataSource(); }
public void GetData(string p_ma_nv) { oQHeGiaDinh.MaNV = p_ma_nv; dtDSQHeGiaDinh = oQHeGiaDinh.GetData(); if (dtDSQHeGiaDinh != null && dtDSQHeGiaDinh.Rows.Count > 0) { PrepareDataSource(); EditDtgInterface(); } }
void Prepare_QHGiaDinh_BanThan() { try { dt_CNVC_QHGiaDinh_BanThan = oCNVC_QHGiaDinh.GetData(); dt_CNVC_QHGiaDinh_BanThan.Columns.Add("ho_ten", typeof(string)); dt_CNVC_QHGiaDinh_BanThan.Columns.Add("que_quan_nghe_nghiep", typeof(string)); for (int i = 0; i < dt_CNVC_QHGiaDinh_BanThan.Rows.Count; i++) { if (dt_CNVC_QHGiaDinh_BanThan.Rows[i]["moi_quan_he"].ToString().Contains("Ba, mẹ ruột") || dt_CNVC_QHGiaDinh_BanThan.Rows[i]["moi_quan_he"].ToString().Contains("Vợ, chồng") || dt_CNVC_QHGiaDinh_BanThan.Rows[i]["moi_quan_he"].ToString().Contains("Anh chị em ruột") || dt_CNVC_QHGiaDinh_BanThan.Rows[i]["moi_quan_he"].ToString().Contains("Các con")) // than nhan ban than moi hien thi { dt_CNVC_QHGiaDinh_BanThan.Rows[i]["ho_ten"] = dt_CNVC_QHGiaDinh_BanThan.Rows[i]["ho"] + " " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["ten"]; dt_CNVC_QHGiaDinh_BanThan.Rows[i]["que_quan_nghe_nghiep"] = dt_CNVC_QHGiaDinh_BanThan.Rows[i]["que_quan"] + " - " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["nghe_nghiep"] + " - " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["chuc_danh_chuc_vu"] + " - " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["don_vi_cong_tac"] + Environment.NewLine + " địa chỉ " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["so_nha"] + " - " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["duong"] + " - " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["phuong_xa"] + " - " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["quan_huyen"] + " - " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["ten_tinh_tp"] + " - " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["ten_quoc_gia"] + Environment.NewLine + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["thanh_vien_to_chuc_ctr_xh"] + " - " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["hoc_tap"] + " - " + dt_CNVC_QHGiaDinh_BanThan.Rows[i]["ghi_chu"]; } } } catch (Exception) { } }