public ActionResult Tree_Menu() { ISession ise = BaseZdBiz.CreateSession(); ICriteria icr = ise.CreateCriteria <MenuModel>(); IList <MenuModel> menus = icr.List <MenuModel>(); IList <TreeNodeObject> nodes = MenuModel.getTreeNode(menus); return(Json(nodes, JsonRequestBehavior.AllowGet)); }
public ActionResult DoEdit(string id) { MemberModel member = BaseZdBiz.CreateSession().Load <MemberModel>(id); member = WebUtil.Eval(member, "", ""); JsResultObject re = BaseZdBiz.Update(member, ""); member.pwd = null; WebUtil.SetSessionAttr(typeof(MemberModel).Name, member); if (re.code == JsResultObject.CODE_SUCCESS) { this.SetResult(JsResultObject.CODE_ALERT, "会员信息保存成功", true); } return(View("Edit")); }
public ActionResult DoResetPwd(string pwd, string newPwd) { MemberModel member = this.getAuthMember(); member = BaseZdBiz.CreateSession().Load <MemberModel>(member.id); JsResultObject re = BaseZdBiz.Save(member); if (pwd != member.pwd) { this.SetResult(JsResultObject.CODE_ERROR, "密码与会员密码不一致", true); } else { member.pwd = newPwd; re = BaseZdBiz.Update(member, ""); if (re.code == JsResultObject.CODE_SUCCESS) { this.SetResult(JsResultObject.CODE_ALERT, "会员密码修改成功", true); } } return(View("Edit")); }