protected void LoadUserInfo(int userId) { EyouSoft.Model.SystemStructure.SystemUser userModel = userBll.GetSystemUserModel(userId); us_txtFax.Value = userModel.ContactFax; us_txtMoible.Value = userModel.ContactMobile; us_txtRealName.Value = userModel.ContactName; us_txtTel.Value = userModel.ContactTel; us_txtUserName1.Value = userModel.UserName; us_txtUserName1.Attributes.Add("readonly", "readonly"); userPermitList = userModel.PermissionList;//账户权限 userTypes = userModel.CustomerTypeIds; //获取账户负责区域列表 EyouSoft.IBLL.SystemStructure.ISysCity cityBll = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance(); StringBuilder areaBuilder = new StringBuilder(); if (userModel.AreaId != null) { foreach (int areaId in userModel.AreaId) { EyouSoft.Model.SystemStructure.SysCity cityModel = cityBll.GetSysCityModel(areaId); areaBuilder.Append(string.Format("<input type='checkbox' checked='checked' id='ckSale_{0}' name='ckSellCity' value='{0}' /><label for='ckSale_{0}'>{1}</label>", areaId.ToString(), cityModel != null ? cityModel.CityName : "暂无")); } } areaHTML = areaBuilder.ToString(); //绑定类别 }
protected void Page_Load(object sender, EventArgs e) { string method = Utils.GetQueryStringValue("method"); userName = MasterUserInfo.UserName; if (!CheckMasterGrant(YuYingPermission.帐户管理_管理该栏目, YuYingPermission.帐户管理_修改密码)) { Utils.ResponseNoPermit(YuYingPermission.帐户管理_修改密码, true); return; } if (!CheckMasterGrant(YuYingPermission.帐户管理_管理该栏目, YuYingPermission.帐户管理_修改密码)) { haveUpdate = false; } if (method == "update") { if (!haveUpdate) { Utils.ResponseMeg(false, "对不起,你没有修改密码的权限!"); return; } string oldPass = Utils.GetQueryStringValue("oldpass"); string newPass1 = Utils.GetQueryStringValue("newpass1"); string newPass2 = Utils.GetQueryStringValue("newpass2"); if (oldPass == "" || newPass1 == "" || newPass2 == "") { Utils.ResponseMegNoComplete(); return; } if (newPass1 != newPass2) { Utils.ResponseMeg(false, "前后两次密码不匹配!"); return; } EyouSoft.IBLL.SystemStructure.ISystemUser userBll = EyouSoft.BLL.SystemStructure.SystemUser.CreateInstance(); EyouSoft.Model.SystemStructure.SystemUser userModel = userBll.GetSystemUserModel(MasterUserInfo.ID); if (userModel != null && userModel.PassWordInfo.NoEncryptPassword == oldPass) { if (userBll.UpdateUserPassWord(MasterUserInfo.ID, newPass1) > 0) { Utils.ResponseMeg(true, "密码已修改,请妥善保管!"); } else { Utils.ResponseMegError(); } } else { Utils.ResponseMeg(false, "原密码不正确!"); } } }
/// <summary> /// 绑定列表的时候,根据ID编号获取审核人姓名 /// </summary> /// <param name="id"></param> /// <returns></returns> protected string GetSysUserName(int id) { string userName = MasterUserInfo.ContactName; if (id != 0) { EyouSoft.Model.SystemStructure.SystemUser userModel = userBll.GetSystemUserModel(id); if (userModel != null) { userName = userModel.ContactName; } } return(userName); }