protected void Page_Load(object sender, EventArgs e)
 {
     if (Request["Menu_ID"] != null && Request["Menu_ID"].ToString() != "" && Request["Menu_ID"].ToString() != String.Empty)
     {
         if (CommonLib.IsNumeric(Request["Menu_ID"]) == true)
         {
             if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"])))
             {
                 Response.Redirect("~/Errors/AccessDenied.aspx");
             }
             _user = _userDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
             _Role = _userDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"]));
             if (!IsPostBack)
             {
                 //HPCBusinessLogic.DAL.T_ThantoanTinbai obj = new HPCBusinessLogic.DAL.T_ThantoanTinbai();
                 //obj.GetLuongtoithieu();
                 //txt_luong.Text = obj.GetLuongtoithieu().ToString();
                 loadRole();
                 LoadCombox();
                 LoadTacgia();
                 type = int.Parse(cbo_types.SelectedValue);
             }
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"])))
     {
         Response.Redirect("~/Errors/AccessDenied.aspx");
     }
     _user = _userDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
     _Role = _userDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"]));
     // this.link_HuyXB.Visible = _Role.R_Pub;
     this.link_HuyXB.Attributes.Add("onclick", "return ConfirmQuestion('" + CommonLib.ReadXML("lblBanmuonhuyXB") + "','ctl00_MainContent_DataGrid_DaXB_ctl01_chkAll');");
     //this.LinkButton1.Visible = _Role.R_Pub;
     this.LinkButton1.Attributes.Add("onclick", "return ConfirmQuestion('" + CommonLib.ReadXML("lblBanmuonhuyXB") + "','ctl00_MainContent_DataGrid_DaXB_ctl01_chkAll');");
     if (!IsPostBack)
     {
         string back        = "";
         string text_search = "";
         try { back = Request["Back"].ToString(); }
         catch {; }
         int pageindex = 0, langid = 0;
         LoadComboBox();
         if (!string.IsNullOrEmpty(back))
         {
             try { text_search = Session["PSDaXB_TenPS"].ToString(); }
             catch {; }
             try { langid = int.Parse(Session["PSDaXB_Langid"].ToString()); }
             catch {; }
             try { pageindex = int.Parse(Session["PSDaXB_pagesindex"].ToString()); }
             catch {; }
             txtSearch_Cate.Text      = text_search;
             cboNgonNgu.SelectedValue = langid.ToString();
             Pager_DaXB.PageIndex     = pageindex;
         }
         LoadPSXB();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request["Menu_ID"] != null && Request["Menu_ID"].ToString() != "" && Request["Menu_ID"].ToString() != String.Empty)
     {
         if (UltilFunc.IsNumeric(Request["Menu_ID"]))
         {
             if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"])))
             {
                 Response.Redirect("~/Errors/AccessDenied.aspx");
             }
             _user = _userDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
             _Role = _userDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"]));
             ActivePermission();
             if (!IsPostBack)
             {
                 int tab = 0;
                 if (Request["TabID"] != null)
                 {
                     if (UltilFunc.IsNumeric(Request["TabID"]))
                     {
                         tab = Convert.ToInt32(Request["TabID"].ToString());
                     }
                 }
                 LoadComboBox();
                 TabContainer1.ActiveTabIndex = tab;
                 TabContainer1_ActiveTabChanged(null, null);
             }
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request["Menu_ID"] != null && Request["Menu_ID"].ToString() != "" && Request["Menu_ID"].ToString() != String.Empty)
     {
         if (UltilFunc.IsNumeric(Request["Menu_ID"]))
         {
             if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"])))
             {
                 Response.Redirect("~/Errors/AccessDenied.aspx");
             }
             _user = _userDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
             _Role = _userDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"]));
             ActiverPermission();
             strMenuID = Request["Menu_ID"].ToString();
             if (!IsPostBack)
             {
                 if (Session["CurrentPage"] != null)
                 {
                     pages.PageIndex = int.Parse(Session["CurrentPage"].ToString());
                     LoadData();
                     Session["CurrentPage"] = null;
                 }
                 else
                 {
                     LoadData();
                 }
             }
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"])))
     {
         Response.Redirect("~/Errors/AccessDenied.aspx");
     }
     _user = _userDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
     _Role = _userDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"]));
     ActiverPemission();
     if (!IsPostBack)
     {
         string back        = "";
         string text_search = "";
         try { back = Request["Back"].ToString(); }
         catch {; }
         int pageindex = 0, tabindex = 0, langid = 0;
         LoadComboBox();
         if (!string.IsNullOrEmpty(back))
         {
             try { tabindex = int.Parse(Session["DuyetPS_TabID"].ToString()); }
             catch {; }
             try { text_search = Session["DuyetPS_TenPS"].ToString(); }
             catch {; }
             try { langid = int.Parse(Session["DuyetPS_Langid"].ToString()); }
             catch {; }
             try { pageindex = int.Parse(Session["DuyetPS_pagesindex"].ToString()); }
             catch {; }
             txtSearch_Cate.Text      = text_search;
             cboNgonNgu.SelectedValue = langid.ToString();
             if (tabindex == 0)
             {
                 TabContainer1.ActiveTabIndex = 0;
                 Pager_choduyet.PageIndex     = pageindex;
             }
             else if (tabindex == 1)
             {
                 TabContainer1.ActiveTabIndex = 1;
                 Pager_HuyXB.PageIndex        = pageindex;
             }
             else
             {
                 Pager_choduyet.PageIndex = 0;
             }
         }
         else
         {
             Pager_choduyet.PageIndex = 0;
         }
         LoadPSchoduyet();
         LoadPSdaduyet();
         LoadPShuyXB();
     }
 }
Example #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request["Menu_ID"] != null && Request["Menu_ID"].ToString() != "" && Request["Menu_ID"].ToString() != String.Empty)
     {
         if (UltilFunc.IsNumeric(Request["Menu_ID"]))
         {
             if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"])))
             {
                 Response.Redirect("~/Errors/AccessDenied.aspx");
             }
             _user     = _userDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
             _Role     = _userDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"]));
             strMenuID = Request["Menu_ID"].ToString();
             if (!IsPostBack)
             {
                 DataBind();
             }
         }
     }
 }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["Menu_ID"] != null && Request["Menu_ID"].ToString() != "" && Request["Menu_ID"].ToString() != String.Empty)
            {
                if (UltilFunc.IsNumeric(Request["Menu_ID"]))
                {
                    if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"])))
                    {
                        Response.Redirect("~/Errors/AccessDenied.aspx");
                    }
                    _user = _userDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
                    _Role = _userDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"]));
                    ActiverPermission();
                    strMenuID = Request["Menu_ID"].ToString();
                    if (!IsPostBack)
                    {
                        LoadComboBox();
                        if (Session["AsdLogolist_LangID"] != null && !string.IsNullOrEmpty(Session["AsdLogolist_LangID"].ToString()))
                        {
                            string langid = "0";
                            langid = Session["AsdLogolist_LangID"].ToString().Trim();
                            cbo_lanquage.SelectedValue = langid;
                        }
                        Session["AsdLogolist_LangID"] = null;
                        Session["AsdLogolist_CATID"]  = null;

                        if (Session["CurrentPage"] != null)
                        {
                            pages.PageIndex        = int.Parse(Session["CurrentPage"].ToString());
                            Session["CurrentPage"] = null;
                        }
                        LoadData();
                    }
                }
            }
        }
Example #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request["Menu_ID"] != null && Request["Menu_ID"].ToString() != "" && Request["Menu_ID"].ToString() != String.Empty)
     {
         if (UltilFunc.IsNumeric(Request["Menu_ID"]))
         {
             if (!HPCSecurity.IsAccept(Convert.ToInt32(Request["Menu_ID"])))
             {
                 Response.Redirect("~/Errors/AccessDenied.aspx");
             }
             _user = _userDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
             _Role = _userDAL.GetRole4UserMenu(_user.UserID, Convert.ToInt32(Request["Menu_ID"]));
             this.ActiverPerssion();
             if (!IsPostBack)
             {
                 string back        = "";
                 string text_search = "";
                 try { back = Request["Back"].ToString(); }
                 catch {; }
                 int pageindex = 0, tabindex = 0, langid = 0;
                 LoadComboBox();
                 if (!string.IsNullOrEmpty(back))
                 {
                     try { text_search = Session["QLPS_TenPS"].ToString(); }
                     catch {; }
                     try { langid = int.Parse(Session["CurrentLangid_QLPS"].ToString()); }
                     catch {; }
                     try { pageindex = int.Parse(Session["CurrentPage_QLPS"].ToString()); }
                     catch {; }
                     try { tabindex = int.Parse(Session["CurrentTab_QLPS"].ToString()); }
                     catch {; }
                     txtSearch_Cate.Text      = text_search;
                     cboNgonNgu.SelectedValue = langid.ToString();
                     if (tabindex == 0)
                     {
                         pages.PageIndex = pageindex;
                         TabContainer1.ActiveTabIndex = tabindex;
                     }
                     else if (tabindex == 2)
                     {
                         Pager_tralai.PageIndex       = pageindex;
                         TabContainer1.ActiveTabIndex = tabindex;
                     }
                     else
                     {
                         TabContainer1.ActiveTabIndex = 0; pages.PageIndex = 0;
                     }
                     Session["CurrentPage_QLPS"]   = null;
                     Session["CurrentTab_QLPS"]    = null;
                     Session["CurrentLangid_QLPS"] = null;
                 }
                 else
                 {
                     TabContainer1.ActiveTabIndex = 0; pages.PageIndex = 0;
                 }
                 int tab_id = 0;
                 int.TryParse(Request["Tab"] == null ? "0" : Request["Tab"], out tab_id);
                 this.TabContainer1.ActiveTabIndex = tab_id;
                 this.TabContainer1_ActiveTabChanged(sender, e);
                 //LoadPSmoi();
                 //LoadPStralai();
                 //LoadPSdaduyet();
                 //LoadPSchoduyet();
             }
         }
     }
 }