合并最新
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
@@ -38,6 +39,12 @@ namespace FineUIPro.Web.Personal
|
||||
{
|
||||
/// Tab1加载页面方法
|
||||
this.Tab1LoadData();
|
||||
if (this.CurrUser.UserId == Const.hfnbdId)
|
||||
{
|
||||
this.btnCustomQuery.Hidden = false;
|
||||
this.lbSystemVersion.Hidden = false;
|
||||
this.lbSystemVersion.Text = Funs.SystemVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +105,55 @@ namespace FineUIPro.Web.Personal
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
var q = Funs.DB.Sys_User.FirstOrDefault(x => x.Account == this.txtAccount.Text.Trim() && (x.UserId != this.CurrUser.UserId || (this.CurrUser.UserId == null && x.UserId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInParent("输入的账号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtUserCode.Text))
|
||||
{
|
||||
var q2 = Funs.DB.Sys_User.FirstOrDefault(x => x.UserCode == this.txtUserCode.Text.Trim() && (x.UserId != this.CurrUser.UserId || (this.CurrUser.UserId == null && x.UserId != null)));
|
||||
if (q2 != null)
|
||||
{
|
||||
Alert.ShowInParent("输入的编号已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtIdentityCard.Text) && BLL.UserService.IsExistUserIdentityCard(this.CurrUser.UserId, this.txtIdentityCard.Text.Trim()) == true)
|
||||
{
|
||||
Alert.ShowInParent("输入的身份证号码已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
Model.Sys_User newUser = new Model.Sys_User
|
||||
{
|
||||
UserCode = this.txtUserCode.Text.Trim(),
|
||||
UserName = this.txtUserName.Text.Trim(),
|
||||
Account = this.txtAccount.Text.Trim(),
|
||||
IdentityCard = this.txtIdentityCard.Text.Trim(),
|
||||
Email = this.txtEmail.Text.Trim(),
|
||||
Telephone = this.txtTelephone.Text.Trim(),
|
||||
};
|
||||
newUser.UserId = this.CurrUser.UserId;
|
||||
UserService.UpdateUserInfo(newUser);
|
||||
Alert.ShowInParent("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
|
||||
}
|
||||
|
||||
protected void btnCustomQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../SysManage/CustomQuery.aspx"), "查询"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user