/// <summary> /// 更新一条数据 /// </summary> public bool Update(EDRS.Model.XT_ZZJG_DWBM model) { return(dal.Update(model)); }
/// <summary> /// 验证用户是否登录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { System.Web.Security.FormsAuthentication.SignOut(); Session.Clear(); Session.Abandon(); Response.Clear(); if (Request.Form.Count == 0)//window.alert('账号未登录,请进入登录页面!'); { Response.Write("<script defer>window.alert('账号未登录,请进入登录页面!');parent.parent.location='/Login.aspx';</script>"); } else { Response.Write(ReturnString.JsonToString(Prompt.error, "登录超时,请刷新页面重新登录fn=parent.skip", null)); } Response.End(); } else { if (this.UserInfo == null) { this.userInfo = Session["user"] as EDRS.Model.XT_ZZJG_RYBM; } if (this.UserDwbm == null) { this.userDwbm = Session["userDwbm"] as EDRS.Model.XT_ZZJG_DWBM; } if (this.UserRole == null) { this.userRole = Session["userRole"] as List <EDRS.Model.XT_QX_JSBM>; } if (this.UserInfo != null) { if (!GetRole(userInfo.DWBM, userInfo.GH)) { Response.Write("您没有权限访问该功能!"); Response.End(); return; } } if (this.UserRole != null) { string jsbms = ""; string bmbms = ""; for (int i = 0; i < UserRole.Count; i++) { jsbms += "'" + UserRole[i].JSBM + "'"; bmbms += "'" + UserRole[i].BMBM + "'"; if (i < UserRole.Count - 1) { jsbms += ","; bmbms += ","; } } this.jsbms = jsbms; this.bmbms = bmbms; } //TODO: 页面权限判断 } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(EDRS.Model.XT_ZZJG_DWBM model) { return(dal.Add(model)); }