public static void load_data_to_cbo_bo_tinh(
            eTAT_CA ip_e_tat_ca
            , DropDownList ip_obj_cbo_bo_tinh)
        {
            US_DM_DON_VI v_us_dm_don_vi = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_dm_don_vi = new DS_DM_DON_VI();

            //v_us_dm_don_vi.FillDataset(v_ds_dm_don_vi, "where ID_LOAI_DON_VI = " + ID_LOAI_DON_VI.BO_TINH);
            string v_str_user_name = HttpContext.Current.Session[SESSION.UserName].ToString();
            v_us_dm_don_vi.FillDataset(
                v_ds_dm_don_vi
                , ID_LOAI_DON_VI.BO_TINH

                , CONST_QLDB.ID_TAT_CA
                , CONST_QLDB.ID_TAT_CA
                , v_str_user_name);

            ip_obj_cbo_bo_tinh.DataSource = v_ds_dm_don_vi.DM_DON_VI;
            ip_obj_cbo_bo_tinh.DataTextField = DM_DON_VI.TEN_DON_VI;
            ip_obj_cbo_bo_tinh.DataValueField = DM_DON_VI.ID;
            ip_obj_cbo_bo_tinh.DataBind();
            if (ip_e_tat_ca == eTAT_CA.YES)
            {
                ip_obj_cbo_bo_tinh.Items.Insert(0, new ListItem(CONST_QLDB.TAT_CA, CONST_QLDB.ID_TAT_CA.ToString()));
            }
        }
 private void load_danh_sach_don_vi()
 {
     US_DM_DON_VI v_us = new US_DM_DON_VI();
     DS_DM_DON_VI v_ds = new DS_DM_DON_VI();
     v_us.FillDataset(v_ds, "order by SO_THU_TU");
     m_sle_chon_don_vi.Properties.DataSource = v_ds.Tables[0];
 }
        public static void load_data_to_cbo_bo_tinh(
            eTAT_CA ip_e_tat_ca
            , ComboBox ip_obj_cbo_bo_tinh)
        {
            US_DM_DON_VI v_us_dm_don_vi = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_dm_don_vi = new DS_DM_DON_VI();

            //v_us_dm_don_vi.FillDataset(v_ds_dm_don_vi, "where ID_LOAI_DON_VI = " + ID_LOAI_DON_VI.BO_TINH);
            string v_str_user_name = HttpContext.Current.Session[SESSION.UserName].ToString();
            v_us_dm_don_vi.FillDataset(
                v_ds_dm_don_vi
                , ID_LOAI_DON_VI.BO_TINH

                , CONST_QLDB.ID_TAT_CA
                , CONST_QLDB.ID_TAT_CA
                , v_str_user_name);
            if (ip_e_tat_ca == eTAT_CA.YES) {
                DataRow v_dr = v_ds_dm_don_vi.DM_DON_VI.NewDM_DON_VIRow();
                v_dr[DM_DON_VI.ID] = CONST_QLDB.ID_TAT_CA;
                v_dr[DM_DON_VI.TEN_DON_VI] = CONST_QLDB.TAT_CA;

                v_ds_dm_don_vi.DM_DON_VI.Rows.InsertAt(v_dr, 0);
            }
            ip_obj_cbo_bo_tinh.DataSource = v_ds_dm_don_vi.DM_DON_VI;
            ip_obj_cbo_bo_tinh.DisplayMember = DM_DON_VI.TEN_DON_VI;
            ip_obj_cbo_bo_tinh.ValueMember = DM_DON_VI.ID;
        }
 private void load_data_to_lst_don_vi(BKI_QLDTEntities ip_db, decimal ip_dc_id_don_vi)
 {
     DS_DM_DON_VI v_ds = new DS_DM_DON_VI();
     US_DM_DON_VI v_us = new US_DM_DON_VI();
     v_us.load_danh_sach_don_vi_X_duoc_xem_du_lieu(ip_dc_id_don_vi, v_ds);
     m_lst_don_vi = v_ds.Tables[0].ToList<DBClassModel.DM_DON_VI>()
         .ToList();
 }
Example #5
0
        public void FillDataSet_Load_data_to_grid_danh_muc_don_vi_by_key_word(
            DS_DM_DON_VI op_ds_don_vi
            , string ip_str_key_word)
        {
            CStoredProc cstored = new CStoredProc("pr_DM_DON_VI_Load_to_grid_danh_muc_by_key_word");

            cstored.addNVarcharInputParam("@ip_str_key_word", ip_str_key_word);
            cstored.fillDataSetByCommand(this, op_ds_don_vi);
        }
 //check validate data
 private bool check_ma_don_vi_is_exist()
 {
     US_DM_DON_VI v_us = new US_DM_DON_VI();
     DS_DM_DON_VI v_ds = new DS_DM_DON_VI();
     v_us.FillDataset(v_ds, "where ma_don_vi = N'" + m_txt_ma_dv.Text + "'");
     if (m_txt_ma_dv.Text != m_us_dm_dv.strMA_DON_VI && v_ds.Tables[0].Rows.Count !=0)
     {
         return true;
     }
     return false;
 }
        private void load_data_to_ddl_ten_don_vi()
        {
            US_DM_DON_VI v_us_don_vi = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_don_vi = new DS_DM_DON_VI();

            v_us_don_vi.FillDataset(v_ds_don_vi);
            m_ddl_ten_don_vi.DataTextField = DM_DON_VI.TEN_DON_VI;
            m_ddl_ten_don_vi.DataValueField = DM_DON_VI.ID;
            m_ddl_ten_don_vi.DataSource = v_ds_don_vi.DM_DON_VI;
            m_ddl_ten_don_vi.DataBind();
        }
Example #8
0
		public US_DM_DON_VI(decimal i_dbID) 
		{
			pm_objDS = new DS_DM_DON_VI();
			pm_strTableName = c_TableName;
			IMakeSelectCmd v_objMkCmd = new CMakeAndSelectCmd(pm_objDS, c_TableName);
			v_objMkCmd.AddCondition("ID", i_dbID, eKieuDuLieu.KieuNumber, eKieuSoSanh.Bang);
			SqlCommand v_cmdSQL;
			v_cmdSQL = v_objMkCmd.getSelectCmd();
			this.FillDatasetByCommand(pm_objDS, v_cmdSQL);
			pm_objDR = getRowClone(pm_objDS.Tables[pm_strTableName].Rows[0]);
		}
 public US_DM_DON_VI(decimal i_dbID)
 {
     pm_objDS = new DS_DM_DON_VI();
     pm_strTableName = c_TableName;
     IMakeSelectCmd v_objMkCmd = new CMakeAndSelectCmd(pm_objDS, c_TableName);
     v_objMkCmd.AddCondition("ID", i_dbID, eKieuDuLieu.KieuNumber, eKieuSoSanh.Bang);
     SqlCommand v_cmdSQL;
     v_cmdSQL = v_objMkCmd.getSelectCmd();
     this.FillDatasetByCommand(pm_objDS, v_cmdSQL);
     pm_objDR = getRowClone(pm_objDS.Tables[pm_strTableName].Rows[0]);
 }
        private void load_data_2_tree()
        {
            US_DM_DON_VI v_us_dv = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_dv = new DS_DM_DON_VI();
            v_us_dv.FillDataset(v_ds_dv);

            m_tree_don_vi.ParentFieldName = DM_DON_VI.ID_DON_VI_CAP_TREN;
            m_tree_don_vi.DataSource = v_ds_dv.Tables[0];
            m_tree_don_vi.RefreshDataSource();

            m_tree_don_vi.ExpandAll();
        }
Example #11
0
        public void FillDataset(
            decimal ip_id_user_group
            , bool is_user_group_using_data
            , DS_DM_DON_VI op_ds_don_vi)
        {
            string v_str_sql_condition = " WHERE " + DM_DON_VI.ID;


            if (is_user_group_using_data)
            {
                v_str_sql_condition += " IN (SELECT ID_DON_VI FROM HT_QUAN_HE_SU_DUNG_DU_LIEU WHERE ID_USER_GROUP =" + ip_id_user_group.ToString() + ")";
            }
            else
            {
                v_str_sql_condition += " NOT IN (SELECT ID_DON_VI FROM HT_QUAN_HE_SU_DUNG_DU_LIEU WHERE ID_USER_GROUP =" + ip_id_user_group.ToString() + ")";
            }
            this.FillDataset(op_ds_don_vi, v_str_sql_condition);
        }
Example #12
0
        private void load_data_2_dv_quan_ly()
        {
            US_DM_DON_VI v_us_don_vi = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_don_vi = new DS_DM_DON_VI();

            v_us_don_vi.load_danh_sach_don_vi(v_ds_don_vi);

            DataRow v_dr = v_ds_don_vi.DM_DON_VI.NewDM_DON_VIRow();

            v_dr[DM_DON_VI.ID]             = 0;
            v_dr[DM_DON_VI.MA_DON_VI]      = "- Chọn một đơn vị -";
            v_ds_don_vi.EnforceConstraints = false;
            v_ds_don_vi.DM_DON_VI.Rows.InsertAt(v_dr, 0);

            m_cbo_dv_don_vi.DataSource    = v_ds_don_vi.DM_DON_VI;
            m_cbo_dv_don_vi.DisplayMember = DM_DON_VI.MA_DON_VI;
            m_cbo_dv_don_vi.ValueMember   = DM_DON_VI.ID;
        }
        public static void load_data_to_cbo_don_vi_su_dung_theo_loai_hinh(
            string ip_str_loai_hinh_don_vi
            , string ip_str_id_don_vi_chu_quan
            , string ip_str_id_bo_tinh
            , eTAT_CA ip_e_tat_ca
            , DropDownList ip_obj_cbo_dv_su_dung
            )
        {
            if (ip_str_id_bo_tinh.Length == 0)
            {
                ip_obj_cbo_dv_su_dung.Items.Clear();
                return;
            }
            if (ip_str_id_don_vi_chu_quan.Length == 0)
            {
                ip_obj_cbo_dv_su_dung.Items.Clear();
                return;
            }

            US_DM_DON_VI v_us_dm_don_vi = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_dm_don_vi = new DS_DM_DON_VI();

            string v_str_user_name = HttpContext.Current.Session[SESSION.UserName].ToString();
            if (!Person.check_session_valid()) return;
            decimal v_dc_id_don_vi_chu_quan = CIPConvert.ToDecimal(ip_str_id_don_vi_chu_quan);
            decimal v_dc_id_bo_tinh = CIPConvert.ToDecimal(ip_str_id_bo_tinh);
            v_us_dm_don_vi.FillDataset(
                v_ds_dm_don_vi
                , ID_LOAI_DON_VI.DV_SU_DUNG
                , v_dc_id_don_vi_chu_quan
                , v_dc_id_bo_tinh
                , ip_str_loai_hinh_don_vi
                , v_str_user_name);
            ip_obj_cbo_dv_su_dung.DataSource = v_ds_dm_don_vi.DM_DON_VI;
            ip_obj_cbo_dv_su_dung.DataTextField = DM_DON_VI.TEN_DON_VI;
            ip_obj_cbo_dv_su_dung.DataValueField = DM_DON_VI.ID;
            ip_obj_cbo_dv_su_dung.DataBind();

            if (ip_e_tat_ca == eTAT_CA.YES)
            {
                ip_obj_cbo_dv_su_dung.Items.Insert(0, new ListItem(CONST_QLDB.TAT_CA, CONST_QLDB.ID_TAT_CA.ToString()));
            }
        }
        public static void load_data_to_cbo_don_vi_chu_quan(
            string ip_str_id_bo_tinh
            , eTAT_CA ip_e_tat_ca
            , DropDownList ip_obj_cbo_dv_chu_quan)
        {
            US_DM_DON_VI v_us_dm_don_vi = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_dm_don_vi = new DS_DM_DON_VI();

            if (ip_str_id_bo_tinh.Length == 0)
            {
                ip_obj_cbo_dv_chu_quan.Items.Clear();
                return;
            }

            string v_str_user_name = HttpContext.Current.Session[SESSION.UserName].ToString();
            decimal v_dc_id_bo_tinh = CIPConvert.ToDecimal(ip_str_id_bo_tinh);
            v_us_dm_don_vi.FillDataset(
                v_ds_dm_don_vi
                , ID_LOAI_DON_VI.DV_CHU_QUAN

                , v_dc_id_bo_tinh
                , CONST_QLDB.ID_TAT_CA
                , v_str_user_name);

            ip_obj_cbo_dv_chu_quan.DataSource = v_ds_dm_don_vi.DM_DON_VI;
            ip_obj_cbo_dv_chu_quan.DataTextField = DM_DON_VI.TEN_DON_VI;
            ip_obj_cbo_dv_chu_quan.DataValueField = DM_DON_VI.ID;
            ip_obj_cbo_dv_chu_quan.DataBind();
            if (ip_e_tat_ca == eTAT_CA.YES)
            {
                ip_obj_cbo_dv_chu_quan.Items.Insert(0, new ListItem(CONST_QLDB.TAT_CA, CONST_QLDB.ID_TAT_CA.ToString()));
            }
        }
        public static void load_data_to_cbo_don_vi_su_dung(
            decimal ip_dc_id_don_vi_chu_quan
            , decimal ip_dc_id_bo_tinh
            , eTAT_CA ip_e_tat_ca
            , ComboBox ip_obj_cbo_dv_su_dung)
        {
            if (ip_dc_id_bo_tinh == 0) {
                    ip_obj_cbo_dv_su_dung.Items.Clear();
                    return;
                }
                if (ip_dc_id_don_vi_chu_quan == 0) {
                    ip_obj_cbo_dv_su_dung.Items.Clear();
                    return;
                }

            US_DM_DON_VI v_us_dm_don_vi = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_dm_don_vi = new DS_DM_DON_VI();

            string v_str_user_name = HttpContext.Current.Session[SESSION.UserName].ToString();

            v_us_dm_don_vi.FillDataset(
                v_ds_dm_don_vi
                , ID_LOAI_DON_VI.DV_SU_DUNG

                , ip_dc_id_don_vi_chu_quan
                , ip_dc_id_bo_tinh
                , v_str_user_name);

            if (ip_e_tat_ca == eTAT_CA.YES) {
                DataRow v_dr = v_ds_dm_don_vi.DM_DON_VI.NewDM_DON_VIRow();
                v_dr[DM_DON_VI.ID] = CONST_QLDB.ID_TAT_CA;
                v_dr[DM_DON_VI.TEN_DON_VI] = CONST_QLDB.TAT_CA;

                v_ds_dm_don_vi.DM_DON_VI.Rows.InsertAt(v_dr, 0);
            }

            ip_obj_cbo_dv_su_dung.DataSource = v_ds_dm_don_vi.DM_DON_VI;
            ip_obj_cbo_dv_su_dung.DisplayMember = DM_DON_VI.TEN_DON_VI;
            ip_obj_cbo_dv_su_dung.ValueMember = DM_DON_VI.ID;
        }
 public US_DM_DON_VI()
 {
     pm_objDS = new DS_DM_DON_VI();
     pm_strTableName = c_TableName;
     pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow();
 }
 public void FillDataSet_Load_data_to_grid_danh_muc_don_vi_by_key_word(
     DS_DM_DON_VI op_ds_don_vi
     , decimal v_dc_id_loai_don_vi
     , string v_str_user_name
     , string v_str_key_word)
 {
     CStoredProc cstored = new CStoredProc("pr_DM_DON_VI_Load_to_grid_danh_muc_by_key_word");
     cstored.addDecimalInputParam("@ip_dc_loai_don_vi", v_dc_id_loai_don_vi);
     cstored.addNVarcharInputParam("@ip_str_user_name", v_str_user_name);
     cstored.addNVarcharInputParam("@ip_str_key_word", v_str_key_word);
     cstored.fillDataSetByCommand(this, op_ds_don_vi);
 }
 public void FillDataset(
     DS_DM_DON_VI op_ds_don_vi
     , decimal ip_dc_id_loai_don_vi
     , decimal ip_dc_id_don_vi_cap_tren1
     , decimal ip_dc_id_don_vi_cap_tren2
     , string ip_str_loai_hinh_don_vi
     , string ip_str_user_name
     )
 {
     CStoredProc v_obj_procedure = new CStoredProc("pr_DM_DON_VI_loai_hinh_don_vi_Select_by_user_name");
     v_obj_procedure.addNVarcharInputParam("@ip_str_user_name", ip_str_user_name);
     v_obj_procedure.addDecimalInputParam("@ip_dc_loai_don_vi", ip_dc_id_loai_don_vi);
     v_obj_procedure.addDecimalInputParam("@ip_dc_id_dv_cap_tren1", ip_dc_id_don_vi_cap_tren1);
     v_obj_procedure.addDecimalInputParam("@ip_dc_id_dv_cap_tren2", ip_dc_id_don_vi_cap_tren2);
     v_obj_procedure.addNVarcharInputParam("@ip_str_loai_hinh_don_vi", ip_str_loai_hinh_don_vi);
     v_obj_procedure.fillDataSetByCommand(this, op_ds_don_vi);
 }
    private void load_list_don_vi_su_dung()
    {
        US_DM_DON_VI v_us_dm_don_vi = new US_DM_DON_VI();
        DS_DM_DON_VI v_ds_dm_don_vi = new DS_DM_DON_VI();

        string v_id_don_vi_chu_quan = m_ddl_don_vi_chu_quan.SelectedValue;
        string v_str_user_name = HttpContext.Current.Session[SESSION.UserName].ToString();
        v_us_dm_don_vi.FillDataset(
                v_ds_dm_don_vi
                , ID_LOAI_DON_VI.DV_SU_DUNG
                , CIPConvert.ToDecimal(m_ddl_don_vi_chu_quan.SelectedValue)
                , CONST_QLDB.ID_TAT_CA
                , v_str_user_name);
        v_ds_dm_don_vi.EnforceConstraints = false;

        DataRow v_dr = v_ds_dm_don_vi.DM_DON_VI.NewDM_DON_VIRow();
        v_dr[DM_DON_VI.ID] = CONST_QLDB.ID_TAT_CA;
        v_dr[DM_DON_VI.TEN_DON_VI] = CONST_QLDB.TAT_CA;
        v_ds_dm_don_vi.DM_DON_VI.Rows.InsertAt(v_dr, 0);

        m_lst_don_vi_su_dung.DataSource = v_ds_dm_don_vi.DM_DON_VI;
        m_lst_don_vi_su_dung.DataTextField = DM_DON_VI.TEN_DON_VI;
        m_lst_don_vi_su_dung.DataValueField = DM_DON_VI.ID;
        m_lst_don_vi_su_dung.DataBind();
    }
Example #20
0
		public US_DM_DON_VI() 
		{
			pm_objDS = new DS_DM_DON_VI();
			pm_strTableName = c_TableName;
			pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow();
		}
        /// <summary>
        /// Đưa danh sách tất cả các đơn vị vào DropDownList
        /// </summary>
        /// <param name="?"></param>
        /// <param name="ip_e_tat_ca"></param>
        /// <param name="ip_obj_cbo_dv_su_dung"></param>
        public static void load_data_to_cbo_don_vi_su_dung(
            eTAT_CA ip_e_tat_ca
            , DropDownList ip_obj_cbo_dv_su_dung)
        {
            US_DM_DON_VI v_us_dm_don_vi = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_dm_don_vi = new DS_DM_DON_VI();

            string v_str_user_name = HttpContext.Current.Session[SESSION.UserName].ToString();

            v_us_dm_don_vi.FillDataset_Load_data_to_grid_danh_muc_don_vi(
                v_ds_dm_don_vi
                , ID_LOAI_DON_VI.DV_SU_DUNG
                , v_str_user_name);

            DataView v_dv_don_vi_su_dung = v_ds_dm_don_vi.DM_DON_VI.DefaultView;
            v_dv_don_vi_su_dung.Sort = DM_DON_VI.TEN_DON_VI + " ASC";

            ip_obj_cbo_dv_su_dung.DataSource = v_dv_don_vi_su_dung.ToTable();
            ip_obj_cbo_dv_su_dung.DataTextField = DM_DON_VI.TEN_DON_VI;
            ip_obj_cbo_dv_su_dung.DataValueField = DM_DON_VI.ID;
            ip_obj_cbo_dv_su_dung.DataBind();

            if (ip_e_tat_ca == eTAT_CA.YES)
            {
                ip_obj_cbo_dv_su_dung.Items.Insert(0, new ListItem(CONST_GIAO_DICH.STR_VALUE_TAT_CA, CONST_GIAO_DICH.ID_TAT_CA.ToString()));
            }
        }
 public static void load_data_to_cbo_don_vi(DropDownList op_ddl_don_vi)
 {
     /*
      * Ham load all don vi trong bang dm_don_vi
      * Order by ten don vi
      */
     DS_DM_DON_VI v_ds = new DS_DM_DON_VI();
     US_DM_DON_VI v_us = new US_DM_DON_VI();
     v_us.FillDataset(v_ds, "order by " + DM_DON_VI.TEN_DON_VI);
     op_ddl_don_vi.DataTextField = DM_DON_VI.TEN_DON_VI;
     op_ddl_don_vi.DataValueField = DM_DON_VI.ID;
     op_ddl_don_vi.DataSource = v_ds.DM_DON_VI;
     op_ddl_don_vi.DataBind();
 }
 private void load_data_to_grid()
 {
     m_grv_danh_sach_dat.Visible = true;
     US_V_DM_DAT m_us_v_dat = new US_V_DM_DAT();
     DS_V_DM_DAT m_ds_v_dat = new DS_V_DM_DAT();
     US_DM_DON_VI m_us_don_vi = new US_DM_DON_VI();
     DS_DM_DON_VI m_ds_don_vi = new DS_DM_DON_VI();
     m_us_v_dat.FillDataSetByKeyWord(CIPConvert.ToStr(m_cbo_bo_tinh.SelectedValue)
                 , CIPConvert.ToStr(m_cbo_don_vi_chu_quan.SelectedValue)
                 , CIPConvert.ToStr(m_cbo_don_vi_su_dung_tai_san.SelectedValue)
                 , CIPConvert.ToStr(m_cbo_trang_thai.SelectedValue)
                 , Person.get_user_name()
                 , CIPConvert.ToStr(m_cbo_loai_hinh_don_vi.SelectedValue)
                 , CIPConvert.ToStr(m_txt_tim_kiem.Text)
                 , m_ds_v_dat);
     m_lbl_title.Text = "DANH MỤC ĐẤT";
     string v_str_thong_tin = " (Có " + m_ds_v_dat.V_DM_DAT.Rows.Count + " bản ghi)";
     m_lbl_title.Text += v_str_thong_tin;
     m_grv_danh_sach_dat.DataSource = m_ds_v_dat.V_DM_DAT;
     m_grv_danh_sach_dat.DataBind();
 }
 private void load_data_to_grid()
 {
     US_V_DM_TAI_SAN_KHAC m_us_v_tai_san_khac = new US_V_DM_TAI_SAN_KHAC();
     DS_V_DM_TAI_SAN_KHAC m_ds_v_tai_san_khac = new DS_V_DM_TAI_SAN_KHAC();
     US_DM_DON_VI m_us_don_vi = new US_DM_DON_VI();
     DS_DM_DON_VI m_ds_don_vi = new DS_DM_DON_VI();
     m_us_v_tai_san_khac.FillDatasetLoadDataToGridTaiSanKhac_by_tu_khoa(m_txt_tim_kiem.Text.Trim()
                 , CIPConvert.ToDecimal(m_cbo_bo_tinh.SelectedValue)
                 , CIPConvert.ToDecimal(m_cbo_don_vi_chu_quan.SelectedValue)
                 , CIPConvert.ToDecimal(m_cbo_don_vi_su_dung_tai_san.SelectedValue)
                 , CIPConvert.ToDecimal(m_cbo_trang_thai.SelectedValue)
                 , CIPConvert.ToStr(m_cbo_loai_hinh_don_vi.SelectedValue)
                 , Person.get_user_name()
                 , m_ds_v_tai_san_khac);
     m_grv_danh_sach_tai_san_khac.DataSource = m_ds_v_tai_san_khac.V_DM_TAI_SAN_KHAC;
     string v_str_thong_tin = " (Có " + m_ds_v_tai_san_khac.V_DM_TAI_SAN_KHAC.Rows.Count + " bản ghi)";
     m_lbl_tieu_de.Text = "DANH SÁCH TÀI SẢN KHÁC";
     m_lbl_tieu_de.Text += v_str_thong_tin;
     m_grv_danh_sach_tai_san_khac.DataBind();
 }
    private void load_cbo_ds_don_vi_duoc_su_dung()
    {
        US_DM_DON_VI v_us_don_vi = new US_DM_DON_VI();
            DS_DM_DON_VI v_ds_don_vi = new DS_DM_DON_VI();

            v_us_don_vi.FillDataset(
                CIPConvert.ToDecimal(m_cbo_user_group.SelectedValue)
                , true
                , v_ds_don_vi);

            m_lst_don_vi_user_group.DataSource = v_ds_don_vi.DM_DON_VI;
            m_lst_don_vi_user_group.DataTextField = DM_DON_VI.TEN_DON_VI;
            m_lst_don_vi_user_group.DataValueField = DM_DON_VI.ID;
            m_lst_don_vi_user_group.DataBind();
    }
Example #26
0
 public void load_danh_sach_don_vi(DS_DM_DON_VI op_ds)
 {
     CStoredProc v_cstore = new CStoredProc("pr_DM_DON_VI_load_danh_sach_don_vi");
     v_cstore.fillDataSetByCommand(this, op_ds);
 }
 private void load_data_to_sle_don_vi()
 {
     US_DM_DON_VI v_us = new US_DM_DON_VI();
     DS_DM_DON_VI v_ds = new DS_DM_DON_VI();
     v_us.FillDataset(v_ds);
     m_sle_don_vi.Properties.DataSource = v_ds.Tables[0];
     m_sle_don_vi.Properties.DisplayMember = DM_DON_VI.TEN_DON_VI;
     m_sle_don_vi.Properties.ValueMember = DM_DON_VI.ID;
     //m_sle_don_vi.Properties.NullText = "---Chọn đơn vị---";
 }
 private DataTable load_data_to_don_vi()
 {
     US_DM_DON_VI v_us = new US_DM_DON_VI();
     DS_DM_DON_VI v_ds = new DS_DM_DON_VI();
     v_us.FillDataset(v_ds);
     return v_ds.Tables[0];
 }
 public bool check_is_having_ma_don_vi(string ip_str_ma_don_vi)
 {
     DS_DM_DON_VI v_ds_dm_don_vi = new DS_DM_DON_VI();
     CStoredProc v_cstore = new CStoredProc("pr_DM_DON_VI_check_ma_don_vi");
     v_cstore.addNVarcharInputParam("@ip_str_ma_don_vi", ip_str_ma_don_vi);
     v_cstore.fillDataSetByCommand(this, v_ds_dm_don_vi);
     if (v_ds_dm_don_vi.DM_DON_VI.Rows.Count == 0)
         return false;
     return true;
 }
 private void load_data_to_grid()
 {
     m_grv_danh_sach_tai_san_khac.Visible = true;
     US_V_DM_TAI_SAN_KHAC m_us_v_tai_san_khac = new US_V_DM_TAI_SAN_KHAC();
     DS_V_DM_TAI_SAN_KHAC m_ds_v_tai_san_khac = new DS_V_DM_TAI_SAN_KHAC();
     US_DM_DON_VI m_us_don_vi = new US_DM_DON_VI();
     DS_DM_DON_VI m_ds_don_vi = new DS_DM_DON_VI();
     m_us_v_tai_san_khac.FillDataSetLoadDataToGridTaiSanKhacLoaiHinh(CIPConvert.ToStr(m_txt_tim_kiem.Text)
                 , CIPConvert.ToStr(m_cbo_loai_hinh_don_vi.SelectedValue)
                 , Person.get_user_name()
                 , CIPConvert.ToDecimal(m_cbo_bo_tinh.SelectedValue)
                 , CIPConvert.ToDecimal(m_cbo_don_vi_chu_quan.SelectedValue)
                 , CIPConvert.ToDecimal(m_cbo_don_vi_su_dung_tai_san.SelectedValue)
                 , CIPConvert.ToDecimal(m_cbo_trang_thai.SelectedValue)
                 , CIPConvert.ToDecimal(m_cbo_loai_tai_san.SelectedValue)
                 , m_ds_v_tai_san_khac);
     m_lbl_title.Text = "DANH MỤC TÀI SẢN KHÁC (TRỪ TRỤ SỞ LÀM VIỆC, CƠ SỞ HOẠT ĐỘNG SỰ NGHIỆP VÀ XE Ô TÔ)";
     string v_str_thong_tin = " (Có " + m_ds_v_tai_san_khac.V_DM_TAI_SAN_KHAC.Rows.Count + " bản ghi)";
     m_lbl_title.Text += v_str_thong_tin;
     m_grv_danh_sach_tai_san_khac.DataSource = m_ds_v_tai_san_khac.V_DM_TAI_SAN_KHAC;
     m_grv_danh_sach_tai_san_khac.DataBind();
 }
        public void FillDataset(
            decimal ip_id_user_group
            , bool is_user_group_using_data
            , DS_DM_DON_VI op_ds_don_vi)
        {
            string v_str_sql_condition = " WHERE " + DM_DON_VI.ID;

            if (is_user_group_using_data)
            {
                v_str_sql_condition += " IN (SELECT ID_DON_VI FROM HT_QUAN_HE_SU_DUNG_DU_LIEU WHERE ID_USER_GROUP =" + ip_id_user_group.ToString() + ")";
            }
            else
            {
                v_str_sql_condition += " NOT IN (SELECT ID_DON_VI FROM HT_QUAN_HE_SU_DUNG_DU_LIEU WHERE ID_USER_GROUP =" + ip_id_user_group.ToString() + ")";
            }
            this.FillDataset(op_ds_don_vi, v_str_sql_condition);
        }
        private void load_data_to_cbo_bo_tinh()
        {
            try
            {
                DS_DM_DON_VI v_ds_dm_don_vi = new DS_DM_DON_VI();
                US_DM_DON_VI v_us_dm_don_vi = new US_DM_DON_VI();
                v_us_dm_don_vi.FillDataset(v_ds_dm_don_vi, "WHERE ID_LOAI_DON_VI = 574");
                m_cbo_bo_tinh.DataSource = v_ds_dm_don_vi.DM_DON_VI;
                m_cbo_bo_tinh.ValueMember = DM_DON_VI.ID;
                m_cbo_bo_tinh.DisplayMember = DM_DON_VI.TEN_DON_VI;

            }
            catch (System.Exception ex)
            {
                CSystemLog_301.ExceptionHandle(ex);
            }
        }
 public bool InitUSWithIDIsOK(decimal ip_dc_id_don_vi)
 {
     pm_objDS = new DS_DM_DON_VI();
     pm_strTableName = c_TableName;
     IMakeSelectCmd v_objMkCmd = new CMakeAndSelectCmd(pm_objDS, c_TableName);
     v_objMkCmd.AddCondition("ID", ip_dc_id_don_vi, eKieuDuLieu.KieuNumber, eKieuSoSanh.Bang);
     SqlCommand v_cmdSQL;
     v_cmdSQL = v_objMkCmd.getSelectCmd();
     this.FillDatasetByCommand(pm_objDS, v_cmdSQL);
     if (pm_objDS.Tables[pm_strTableName].Rows.Count == 0) return false ;
     pm_objDR = getRowClone(pm_objDS.Tables[pm_strTableName].Rows[0]);
     return true;
 }
        private void load_data_to_cbo_don_vi_su_dung()
        {
            try
            {
                if (m_cbo_don_vi_chu_quan.SelectedValue == null)
                {
                    m_cbo_don_vi_su_dung.DataSource = null;
                    m_cbo_dia_chi.DataSource = null;
                    return;

                }
                DS_DM_DON_VI v_ds_dm_don_vi = new DS_DM_DON_VI();
                US_DM_DON_VI v_us_dm_don_vi = new US_DM_DON_VI();
                v_us_dm_don_vi.FillDataset(v_ds_dm_don_vi, "where ID_LOAI_DON_VI = 576 and ID_DON_VI_CAP_TREN = " + CIPConvert.ToDecimal(m_cbo_don_vi_chu_quan.SelectedValue));
                m_cbo_don_vi_su_dung.DataSource = v_ds_dm_don_vi.DM_DON_VI;
                m_cbo_don_vi_su_dung.DisplayMember = DM_DON_VI.TEN_DON_VI;
                m_cbo_don_vi_su_dung.ValueMember = DM_DON_VI.ID;
            }
            catch (System.Exception ex)
            {
                CSystemLog_301.ExceptionHandle(ex);
            }
        }
 public static void load_data_to_ddl_don_vi_get_list_don_vi_duoc_xem_du_lieu(decimal ip_dc_id_don_vi, DropDownList op_ddl)
 {
     DS_DM_DON_VI v_ds = new DS_DM_DON_VI();
     US_DM_DON_VI v_us = new US_DM_DON_VI();
     v_us.load_danh_sach_don_vi_X_duoc_xem_du_lieu(ip_dc_id_don_vi, v_ds);
     op_ddl.DataValueField = DM_DON_VI.ID;
     op_ddl.DataTextField = DM_DON_VI.TEN_DON_VI;
     op_ddl.DataSource = v_ds.DM_DON_VI;
     op_ddl.DataBind();
 }
 private DataSet load_data_2_ds_v_dm_don_vi()
 {
     US_DM_DON_VI v_us = new US_DM_DON_VI();
     DS_DM_DON_VI v_ds = new DS_DM_DON_VI();
     v_us.FillDataset(v_ds);
     return v_ds;
 }