//修改 private void Edit() { //修改 try { if (CheckInput()) { //从页面上取值 var SysUserTemp = GetSysUserFromPage(); var sysUserLogin = sysUserLoginFromPage(); if (SysUserTemp == null) { //提示消息:不存在模板 ShowMsg(false, "不存在模板"); } else { //SysHospitalArea.Delete(HospitalArea); if (!IsExists(SysUserTemp, 0)) { int result = BLL.AddSysUser(SysUserTemp, sysUserLogin, "2"); if (result > 0) { StringBuilder strLog = new StringBuilder(); strLog.AppendFormat("【修改用户】【ID】: {0}【登录名】:{1}【用户姓名】:{2}【角色】 : {3}【联系方式】 : {4}【是否可用】:{5}", SysUserTemp.SysUser_ID, SysUserTemp.SysUser_LoginName, SysUserTemp.SysUser_Name, sysUserLogin.SysRole_Name, SysUserTemp.SysUser_Tel, SysUserTemp.SysUser_Enable); new BLL_clsAuth().AddLogFromBS(Module_Id, strLog.ToString()); ClientScript.RegisterStartupScript(this.GetType(), "InfoSave", "<script type='text/javascript'>$(function(){layer.ready(function(){layer.msg('操作成功',{icon:1,time:1000},function(){parent.window.location.href=window.parent.pageUrl})});})</script>"); } else { ClientScript.RegisterStartupScript(this.GetType(), "InfoSave", "<script type='text/javascript'>$(function(){layer.ready(function(){layer.msg('操作失败',{icon:2})})});</script>"); } } else { ClientScript.RegisterStartupScript(this.GetType(), "InfoSave", "<script type='text/javascript'>$(function(){layer.ready(function(){layer.msg('此用户已存在',{icon:4})})});</script>"); } } } } catch (Exception ex) { new BLL_clsAuth().AddLogErrorFromBS(Module_Id, string.Format("类:{0},方法:{1},错误信息:{2}, 详细:{3}", ex.TargetSite.DeclaringType.ToString(), ex.TargetSite.Name.ToString(), ex.Message, ex.StackTrace)); throw ex; } }