コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                user = BLL.OrgMgr.GetCurrentAdUser();


                if (!string.IsNullOrEmpty(Request.QueryString["Action"]))
                {
                    if (VaildateExamTime(HttpUtility.UrlDecode(Request["Action"]).Trim()))
                    {
                        Response.Write("<script>alert('再次考试需要满24小时!');window.history.go(-1);</script>");
                        return;
                    }
                    //保存考试信息
                    SaveExamResult();
                    return;
                }

                if (!string.IsNullOrEmpty(Request["id"]))
                {
                    if (VaildateExamTime(HttpUtility.UrlDecode(Request["id"]).Trim()))
                    {
                        Response.Write("<script>alert('再次考试需要满24小时!');window.history.go(-1);</script>");
                    }
                    //取题
                    GetQuestionList();
                    Session["examTime"] = DateTime.Now.AddMinutes(40).ToString("yyyy-MM-dd HH:mm:ss");
                }
            }
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         user = BLL.OrgMgr.GetCurrentAdUser();
         Bind();
     }
 }
コード例 #3
0
        public void UserRole()
        {
            user = BLL.OrgMgr.GetCurrentAdUser();

            string    sqlUser = "******" + user.UID + "'";
            DataTable dtUser  = DAL.SqlHelper.GetDataTableOfRecord(sqlUser);

            if (dtUser != null && dtUser.Rows.Count > 0)
            {
                var role = dtUser.Rows[0]["UserRole"];

                userRole = 1;
            }
        }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Bind("", true);
         Model.UserInfo user = BLL.OrgMgr.GetCurrentAdUser();
         if (user.UID == "1518819" || user.UID == "1258504" || user.UID == "1189648" || user.UID == "xuh4")
         {
             FileUploadDeptHead.Visible = true;
             btnUploadDeptHead.Visible  = true;
         }
         UserRoleControl();
     }
 }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }

            Model.UserInfo user = BLL.OrgMgr.GetCurrentAdUser();

            DataTable approvalTable = BLL.RequestMgr.GetRequestsByTaskOwner(user.UID);

            if (approvalTable.Rows.Count > 0)
            {
                this.dgvRequests.DataSource = approvalTable;
                this.dgvRequests.DataBind();
            }
        }
コード例 #6
0
        /// <summary>
        /// 权限
        /// </summary>
        void UserRoleControl()
        {
            user = BLL.OrgMgr.GetCurrentAdUser();

            string    sqlUser = "******" + user.UID + "'";
            DataTable dtUser  = DAL.SqlHelper.GetDataTableOfRecord(sqlUser);

            //user.UID == "1518819" || user.UID == "1258504" || user.UID == "xuh4"
            if (dtUser != null && dtUser.Rows.Count > 0)
            {
                userRole = dtUser.Rows.Count;
            }
            else
            {
                userRole = 0;
            }
        }