Example #1
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             = _NguoidungDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
             _Role             = _NguoidungDAL.GetRole4UserMenu(_user.UserID, MenuID);
             btnUpload.Enabled = _Role.R_Write;
             btnDelete.Enabled = _Role.R_Delete;
             if (!IsPostBack)
             {
                 if (Session["CurrentPage"] != null)
                 {
                     pageappro.PageIndex = int.Parse(Session["CurrentPage"].ToString());
                     LoadDataApprovied();
                 }
                 else
                 {
                     LoadDataApprovied();
                 }
             }
         }
     }
 }
 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 (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.LinkCancel.Attributes.Add("onclick", "return ConfirmQuestion('Bạn có chắc muốn xóa?','ctl00_MainContent_grdListCate');");
                    if (Page.Request.Params["status"] != null)
                    {
                        if (CommonLib.IsNumeric(Page.Request.Params["status"].ToString()))
                        {
                            status = int.Parse(Page.Request.Params["status"].ToString());
                        }
                    }
                    if (Page.Request.Params["Tab"] != null)
                    {
                        if (CommonLib.IsNumeric(Page.Request.Params["Tab"].ToString()))
                        {
                            tab = int.Parse(Page.Request.Params["Tab"].ToString());
                        }
                    }
                    //LangID = PopulateItem(cat_id).Lang_ID;
                    try { pageback = int.Parse(Session["PageFromID"].ToString()); }
                    catch {; }
                    if (!IsPostBack)
                    {
                        CheckPermission();
                        //if ()
                        //{
                        if (Request["BackID"] != null && Request["BackID"] != "")
                        {
                            int page_index = 0;
                            try { page_index = int.Parse(Session["PageIndex_DetailCAT"].ToString()); }
                            catch {; }
                            pages.PageIndex = page_index;
                        }
                        LoadData(status);
                        //}
                    }
                }
            }
        }
Example #4
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();
             if (!IsPostBack)
             {
                 LoadData();
             }
         }
     }
 }
Example #5
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.LinkCancel.Attributes.Add("onclick", "return ConfirmQuestion('" + CommonLib.ReadXML("lbBanmuonxoa") + "','ctl00_MainContent_grdListCate');");
             if (Page.Request.Params["id"] != null)
             {
                 if (CommonLib.IsNumeric(Page.Request.Params["id"].ToString()))
                 {
                     cat_id = int.Parse(Page.Request.Params["id"].ToString());
                 }
             }
             lblTenPhongsu.Text = PopulateItem(cat_id).Cat_Album_Name;
             LangID             = PopulateItem(cat_id).Lang_ID;
             if (!IsPostBack)
             {
                 if (CheckPermission(cat_id))
                 {
                     if (Request["BackID"] != null && Request["BackID"] != "")
                     {
                         int page_index = 0;
                         try { page_index = int.Parse(Session["PageIndex_DetailCAT"].ToString()); }
                         catch {; }
                         pages.PageIndex = page_index;
                     }
                     LoadData(cat_id);
                 }
             }
         }
     }
 }
 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)
             {
                 int tab_id = 0;
                 if (Request["Tab"] != null)
                 {
                     tab_id = Convert.ToInt32(Request["Tab"].ToString());
                     if (tab_id == 0)
                     {
                         this.TabContainer1.ActiveTabIndex = 0;
                         this.TabContainer1_ActiveTabChanged(sender, e);
                     }
                     if (tab_id == 1)
                     {
                         this.TabContainer1.ActiveTabIndex = 1;
                         this.TabContainer1_ActiveTabChanged(sender, e);
                     }
                 }
                 else
                 {
                     this.TabContainer1.ActiveTabIndex = 0;
                     this.TabContainer1_ActiveTabChanged(sender, e);
                 }
                 LoadComboBox();
             }
         }
     }
 }
Example #7
0
        protected void Save_Click()
        {
            int    Menu_ID   = 0;
            string NoiDung   = string.Empty;
            string SoTu      = string.Empty;
            string NgayHT    = string.Empty;
            string NguoiNhan = string.Empty;
            string tieudecv  = string.Empty;
            string ip        = string.Empty;

            try
            {
                System.Globalization.CultureInfo mProvider = new System.Globalization.CultureInfo("en-US", false);
                if (mContext.Request.QueryString["mn_id"] != "undefined")
                {
                    Menu_ID = int.Parse(mContext.Request.QueryString["mn_id"], mProvider);
                }
                if (mContext.Request.QueryString["nguoinhan"] != "undefined")
                {
                    NguoiNhan = mContext.Request.QueryString["nguoinhan"].ToString();
                }
                if (mContext.Request.QueryString["tieudecv"] != "undefined")
                {
                    tieudecv = mContext.Request.QueryString["tieudecv"].ToString();
                }
                if (mContext.Request.QueryString["noidung"] != "undefined")
                {
                    NoiDung = mContext.Request.QueryString["noidung"].ToString();
                }
                if (mContext.Request.QueryString["sotu"] != "undefined")
                {
                    SoTu = mContext.Request.QueryString["sotu"].ToString();
                }
                if (mContext.Request.QueryString["ngayht"] != "undefined")
                {
                    NgayHT = mContext.Request.QueryString["ngayht"].ToString();
                }
                if (mContext.Request.QueryString["ip"] != "undefined")
                {
                    ip = mContext.Request.QueryString["ip"].ToString();
                }

                HPCBusinessLogic.NguoidungDAL _NguoidungDAL = new NguoidungDAL();
                T_Users          _user;
                T_RolePermission _Role = null;
                _user = _NguoidungDAL.GetUserByUserName(HPCSecurity.CurrentUser.Identity.Name);
                _Role = _NguoidungDAL.GetRole4UserMenu(_user.UserID, Menu_ID);
                #region GhiLog
                Lichsu_Thaotac_HethongDAL actionDAL = new Lichsu_Thaotac_HethongDAL();
                T_Lichsu_Thaotac_Hethong  action    = new T_Lichsu_Thaotac_Hethong();
                action.Ma_Nguoidung = _user.UserID;
                action.TenDaydu     = _user.UserFullName;
                action.HostIP       = ip;
                action.NgayThaotac  = DateTime.Now;
                #endregion

                CongviecDAL _cvDAL  = new CongviecDAL();
                T_Congviec  _cv     = SetItem(NoiDung, SoTu, NgayHT, NguoiNhan, tieudecv);
                double      _return = _cvDAL.InsertT_Congviec(_cv);

                action.Thaotac = "[Thêm mới công việc]-->[mã công việc:" + _return.ToString() + " ]";
                actionDAL.InserT_Lichsu_Thaotac_Hethong(action);
                mContext.Response.Write("1");
            }
            catch { mContext.Response.Write("0"); }
        }