public static bool check_user_have_menu()
    {
        object v_obj_id_user_login = HttpContext.Current.Session[SESSION.UserID];
        if (v_obj_id_user_login == null) return false;
        else
        {
            if (get_chuc_nang_without_query() == "Default.aspx") return true;

            if (CIPConvert.ToDecimal(v_obj_id_user_login) == -1)
            {
                return false;
            }
            else
            {
                DS_HT_NGUOI_SU_DUNG v_ds_ht_nguoi_su_dung = new DS_HT_NGUOI_SU_DUNG();
                US_HT_NGUOI_SU_DUNG v_us_ht_nguoi_su_dung = new US_HT_NGUOI_SU_DUNG();
                v_us_ht_nguoi_su_dung.FillDataset(v_ds_ht_nguoi_su_dung, "where id = " + v_obj_id_user_login.ToString());
                if (v_ds_ht_nguoi_su_dung.HT_NGUOI_SU_DUNG.Count < 1) return false;
                v_us_ht_nguoi_su_dung = new US_HT_NGUOI_SU_DUNG(CIPConvert.ToDecimal(v_obj_id_user_login));
                US_HT_USER_GROUP v_us_ht_user_group = new US_HT_USER_GROUP(v_us_ht_nguoi_su_dung.dcID_USER_GROUP);
                US_HT_QUYEN_GROUP v_us_ht_quyen_group = new US_HT_QUYEN_GROUP();
                DS_HT_QUYEN_GROUP v_ds_ht_quyen_group = new DS_HT_QUYEN_GROUP();
                v_us_ht_quyen_group.FillDataset(v_ds_ht_quyen_group, "where id_user_group = " + v_us_ht_user_group.dcID +
                    " and id_quyen in (select id from ht_chuc_nang where url_form like N'%" + get_chuc_nang() + "%' and trang_thai_yn ='Y' and hien_thi_yn='Y')");
                if (v_ds_ht_quyen_group.HT_QUYEN_GROUP.Count < 1)
                {
                    v_ds_ht_quyen_group.Clear();
                    v_us_ht_quyen_group.FillDataset(v_ds_ht_quyen_group, "where id_user_group = " + v_us_ht_user_group.dcID +
                    " and id_quyen in (select id from ht_chuc_nang where url_form like N'%" + get_chuc_nang_without_query() + "%' and trang_thai_yn ='Y' and hien_thi_yn='Y')");
                    if (v_ds_ht_quyen_group.HT_QUYEN_GROUP.Count < 1) return false;
                };
            }

        }
        return true;
    }
 private void load_cbo_user_group_grv()
 {
     try
     {
         US_HT_USER_GROUP v_us_user_group = new US_HT_USER_GROUP();
         DS_HT_USER_GROUP v_ds_user_group = new DS_HT_USER_GROUP();
         v_us_user_group.FillDataset(v_ds_user_group);
         m_cbo_user_group_on_grid.DataSource = v_ds_user_group.HT_USER_GROUP;
         m_cbo_user_group_on_grid.DataTextField = HT_USER_GROUP.USER_GROUP_NAME;
         m_cbo_user_group_on_grid.DataValueField = CM_DM_LOAI_TD.ID;
         m_cbo_user_group_on_grid.DataBind();
     }
     catch (Exception v_e)
     {
         throw v_e;
     }
 }
 private void load_data_2_us_by_id(int ip_i_row_index)
 {
     decimal v_dc_chuc_nang_id = CIPConvert.ToDecimal(m_grv_dm_nhom_quyen_he_thong.DataKeys[ip_i_row_index].Value);
     hdf_id.Value = CIPConvert.ToStr(v_dc_chuc_nang_id);
     m_us_ht_user_group = new US_HT_USER_GROUP(v_dc_chuc_nang_id);
     m_txt_ten_nhom_quyen.Text = m_us_ht_user_group.strUSER_GROUP_NAME;
     m_txt_mo_ta.Text = m_us_ht_user_group.strDESCRIPTION;
 }
 private void load_cbo_user_group()
 {
     US_HT_USER_GROUP v_us_user_group = new US_HT_USER_GROUP();
         DS_HT_USER_GROUP v_ds_user_group = new DS_HT_USER_GROUP();
         v_us_user_group.FillDataset(v_ds_user_group);
         m_cbo_user_group.DataSource = v_ds_user_group.HT_USER_GROUP;
         m_cbo_user_group.DataTextField = HT_USER_GROUP.USER_GROUP_NAME;
         m_cbo_user_group.DataValueField = CM_DM_LOAI_TD.ID;
         m_cbo_user_group.DataBind();
 }
 public static decimal get_id_don_vi()
 {
     decimal v_dc_id_don_vi = 0;
     US_HT_NGUOI_SU_DUNG v_us_nsd = new US_HT_NGUOI_SU_DUNG(get_user_id());
     US_HT_USER_GROUP v_us_ug = new US_HT_USER_GROUP(v_us_nsd.dcID_USER_GROUP);
     v_dc_id_don_vi = v_us_ug.dcID_DON_VI;
     return v_dc_id_don_vi;
 }