/// <summary> /// 为用户分配页面操作权限 /// </summary> /// <param name="userSession">当前登录用户Session信息</param> /// <param name="pageUrl">页面地址</param> public void PermissionsDistribution(Utility.UserSession userSession, string pageUrl) { /*//遍历角色 * foreach (Utility.UserRole role in userSession.UserRole) { * //遍历菜单 * foreach (Utility.UserMenu menu in role.UserMenu) { * //判断是否拥有此页面的操作权限 * if (menu.MENUURL.Equals(pageUrl)) { * //遍历action * foreach (Entity.BASE_ACTION action in menu.UserAction) { #region 功能按钮授权 * switch (action.ACTIONNAME) { * case "添加": _BtnAdd.Visible = true; break; * case "删除": _BtnDelete.Visible = true; break; * case "修改": _BtnUpdate.Visible = true; break; * case "查看": _BtnView.Visible = true; break; * case "查询": _BtnSearch.Visible = true; break; * case "导入": _BtnImport.Visible = true; break; * case "导出": _BtnExport.Visible = true; break; * case "打印": _BtnPrint.Visible = true; break; * case "移动": _BtnMove.Visible = true; break; * case "下载": _BtnDownload.Visible = true; break; * case "备份": _BtnBackup.Visible = true; break; * case "审核": _BtnVerify.Visible = true; break; * case "授权": _BtnGrant.Visible = true; break; * case "重置": _BtnCancel.Visible = true; break; * } #endregion * } * } * } * }*/ }
/// <summary> /// 绑定文档类别树树 数据源 /// </summary> private void DocuemntClassDataSource() { DataTable dt = new DataTable(); //获取部门数据源 BLL.BASE_ARTICLE_TYPE bll = new BLL.BASE_ARTICLE_TYPE(); Utility.UserSession _userSession = (Utility.UserSession)Session["user"]; if (_userSession == null) { Response.Redirect("~/AdminLogin.aspx", true); } dt = bll.GetList(string.Format("DEPTID={0}", _userSession.DEPTID.ToString())); TreeNode rootNode = new TreeNode(); rootNode.Text = "档案分类树"; rootNode.Value = "0"; rootNode.Expanded = true; if (dt != null && dt.Rows.Count != 0) { InitTreeView(rootNode, dt); } this.trvControl.Nodes.Add(rootNode); }
protected void Page_Load(object sender, EventArgs e) { userSession = (Utility.UserSession)Session["user"]; if (!IsPostBack) { if ("" == Request.QueryString["aid"] || null == Request.QueryString["aid"]) { if (this.hidPrimary.Value == "-1") { this.LbHeadName.Text = "新建电子公告";//设置标题头名称 this.TxtTime.Text = DateTime.Now.ToString("yyyy-MM-dd"); } else { this.LbHeadName.Text = "编辑电子公告";//设置标题头名称 decimal AFFICHEID = Convert.ToDecimal(this.hidPrimary.Value); Entity.BASE_AFFICHE model = bll.Getmodel(AFFICHEID); SetEntity(model); } } else { this.LbHeadName.Text = "编辑电子公告";//设置标题头名称 decimal AFFICHEID = Convert.ToDecimal(Request.QueryString["aid"]); Entity.BASE_AFFICHE model = bll.Getmodel(AFFICHEID); SetEntity(model); } } }
protected void Page_Load(object sender, EventArgs e) { //告诉表单如何格式化文件信息 Page.Form.Enctype = "multipart/form-data"; //init session if (Session["user"] != null) { userSession = (Utility.UserSession)Session["user"]; } //get send id if (Request.QueryString["id"] != null) { srcModel = bll.GetEntity(Convert.ToInt32(Request.QueryString["id"])); txtTitle.Text = srcModel.TITLE + "的回复"; txtContent.Text = string.Format("<p></p><p>引用“{0}”</p>", srcModel.CONTENT); hidSrcCode.Value = srcModel.ID.ToString(); hnkSourceTitle.Text = srcModel.TITLE; hnkSourceTitle.NavigateUrl = string.Format("~/ManageCenter/Official/Detail.aspx?id={0}", srcModel.ID.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { session = (Utility.UserSession)Session["user"]; if (!IsPostBack) { BindDataSource(); } }
/// <summary> /// 页面加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { //获取用户Session userSession = (Utility.UserSession)Session["user"]; if (!IsPostBack) { } }
protected void Page_Load(object sender, EventArgs e) { //获取用户Session userSession = (Utility.UserSession)Session["user"]; if (!IsPostBack) { //绑定收文列表数据 BindAcceptList(); } }
protected void Page_Load(object sender, EventArgs e) { session = (Utility.UserSession)Session["user"]; if (!IsPostBack) { BindingRoadType(); //绑定路产设备类型数据 txtREGTIME.Text = DateTime.Now.ToString("yyyy-MM-dd"); txtCOMPTIME.Text = DateTime.Now.ToString("yyyy-MM-dd"); } }
protected void Page_Load(object sender, EventArgs e) { //选定节点改变时触发的事件 TreeView1.OnSelectedNodeChanged += new SmartHyd.Ascx.OnSelectedNodeChanged(TreeView1_OnSelectedNodeChanged); //获取用户Session userSession = (Utility.UserSession)Session["user"]; if (!IsPostBack) { //绑定发文列表数据 BindPublichList(); } }
//加载 protected void Page_Load(object sender, EventArgs e) { session = (Utility.UserSession)Session["user"]; if (!IsPostBack) { txtBeginTime.Text = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"); //开始时间 txtEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd"); //结束时间 BindingRoadType(); //绑定设备类型 BingrRoadList(); //绑定数据列表 } }
protected void Page_Load(object sender, EventArgs e) { session = (Utility.UserSession)Session["user"]; if (!IsPostBack) { BindType(); txtBeginTime.Text = DateTime.Now.AddDays(-5).ToString("yyyy-MM-dd"); txtEndTime.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"); BindDataSource(); } }
protected void Page_Load(object sender, EventArgs e) { userSession = (Utility.UserSession)Session["user"]; if (!IsPostBack) { string deptId = Request.QueryString["deptid"]; string deptName = Request.QueryString["deptName"]; string userid = Request.QueryString["userid"]; if (null == deptId || "" == deptId) { //初始化用户列表:默认0代表河南省交通运输厅高速公路管理局下的用户 BindUserList(1); //绑定用户列表 ViewState["deptid"] = 1; //用于存储当前部门编号 hfdUnitName.Value = "河南省交通运输厅高速公路管理局"; hfdUnitID.Value = "1"; } else { hfdUnitName.Value = deptName; hfdUnitID.Value = deptId; decimal deptid = Convert.ToDecimal(deptId); //获取部门编号 ViewState["deptid"] = deptid; //用于存储当前部门编号 if (null == userid || "" == userid) { //判读用户编号是否为空; BindUserList(deptid);//绑定用户列表 } else {//用户编号不为空执行删除操作 if (Request.QueryString["action"] == "del") { int id = Convert.ToInt32(userid); // int userid = Convert.ToInt32(Request.QueryString["userid"]); //Updatestate(id);//删除用户 DelUser(id); //删除用户 BindUserList(deptid); //绑定用户列表 } else { BindUserList(deptid);//绑定用户列表 } } } } }
protected void Page_Load(object sender, EventArgs e) { session = (Utility.UserSession)Session["user"]; if (!IsPostBack) { BindType(); if (Request.QueryString["id"] != null) { Entity.BASE_DOCUMENT_TYPE model = new Entity.BASE_DOCUMENT_TYPE(); model = bll.GetEntity(Convert.ToDecimal(Request.QueryString["id"])); this.SetEntity(model); } } }
protected void Page_Load(object sender, EventArgs e) { userSession = (Utility.UserSession)Session["user"]; if (Request.QueryString["id"] != null) { int id = Convert.ToInt32(Request.QueryString["id"]); Entity.BASE_MESSAGE m = new Entity.BASE_MESSAGE(); m = bll.GetEntity(id); Entity.BASE_USER userModel = new Entity.BASE_USER(); userModel = bllUser.GetUser(Convert.ToInt32(m.SENDER)); txtAccept.Text = userModel.USERNAME; } }
protected void Page_Load(object sender, EventArgs e) { userSession = (Utility.UserSession)Session["user"]; if (!IsPostBack) { //获取数据源 DataTable dt = new DataTable(); dt = dept.GetUserWhereDepartment(userSession.USERNAME, -1); //递归部门列表 ddlDepartment.Items.Clear(); RecursiveNode(ddlDepartment, dt, Convert.ToInt32(userSession.DEPTID), 0); ddlDepartment.SelectedValue = userSession.DEPTID.ToString(); Session["deptcode"] = userSession.DEPTID; } }
//页面加载 protected void Page_Load(object sender, EventArgs e) { //获取用户Session userSession = (Utility.UserSession)Session["user"]; if (!IsPostBack) { if (Request.QueryString["id"] != null) { sendId = Convert.ToInt32(Request.QueryString["id"]); } //获取发文实体 model = bll.GetEntity(sendId); //绑定回文列表数据 BindingReplyList(); } }
/// <summary> /// 用户登录 /// </summary> /// <param name="userName">用户名</param> /// <param name="pwd">密码</param> /// <returns>true登录成功,false失败</returns> public bool Login(string userName, string pwd) { //判断用户是否存在 Entity.BASE_USER model; model = bll.GetUser(userName, pwd); if (model != null) { //初始化用户Session类 Utility.UserSession userSession = new Utility.UserSession(Convert.ToInt32(model.USERID)); //用户Session加入Session if (this.Add("user", userSession)) { return(true); } } return(false); }
//页面加载 protected void Page_Load(object sender, EventArgs e) { //告诉表单如何格式化文件信息 Page.Form.Enctype = "multipart/form-data"; userSession = (Utility.UserSession)Session["user"]; if (!IsPostBack) { BindingType(); //绑定公文分类 BindAcceptUnit(); //绑定收文部门 } //获取编辑模式ID if (Request.QueryString["id"] != null) { int id = Convert.ToInt32(Request.QueryString["id"].ToString()); Entity.BASE_ARTICLE model = new Entity.BASE_ARTICLE(); model = bll.GetEntity(id); SetEntity(model); } }
protected void Page_Load(object sender, EventArgs e) { session = (Utility.UserSession)Session["user"]; if (Request.QueryString["id"] != null) { int id = Convert.ToInt32(Request.QueryString["id"]); Model = bll.GetModel(id); //init model to page lblRoadName.Text = Model.LINENAME; lblDriverName.Text = Model.ROADNAME; lblPoint.Text = string.Format("K:{0} M:{1}", Model.STAKEK.ToString(), Model.STAKEM.ToString()); lblPointSummary.Text = Model.SUMMARY; txtBeginTime.Text = Model.REGTIME.ToString(); txtEndTime.Text = Model.COMPTIME.ToString(); litPic.Text = string.Format("<img src='http://{0}/{1}' width='500' height='250'/>", Request.Url.Authority, Model.PHOTO); } }
protected void Page_Load(object sender, EventArgs e) { //告诉表单如何格式化文件信息 Page.Form.Enctype = "multipart/form-data"; userSession = (Utility.UserSession)Session["user"]; if (!IsPostBack) { BindType(); txtBeginTime.Text = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"); txtEndTime.Text = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd"); //获取编辑模式ID if (Request.QueryString["id"] != null) { int id = Convert.ToInt32(Request.QueryString["id"].ToString()); Entity.BASE_DOCUMENT model = new Entity.BASE_DOCUMENT(); model = bll.GetEntity(id); SetEntity(model); } } }