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"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { user = BLL.OrgMgr.GetCurrentAdUser(); Bind(); } }
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; } }
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(); } }
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(); } }
/// <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; } }