59 lines
2.2 KiB
C#
59 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace Mtxfw.shop
|
|
{
|
|
public partial class Member_editName : Mtxfw.Utility.MemberBase
|
|
{
|
|
public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
|
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config();
|
|
|
|
protected override void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
|
|
if (!IsPostBack)
|
|
{
|
|
Page.Title = "提交申请修改真实姓名 - " + config.webName;
|
|
Mtxfw.Model.user_info model = daoUser.GetModel(Card);
|
|
if (model != null)
|
|
{
|
|
txtName.Text = model.RealName;
|
|
|
|
}
|
|
}
|
|
|
|
Btn_Update.Click += Update_Password;
|
|
}
|
|
|
|
protected void Update_Password(object s, EventArgs ex)
|
|
{
|
|
Mtxfw.Model.user_info model = daoUser.GetModel(Card);
|
|
if (!String.IsNullOrEmpty(txtName2.Text))
|
|
{
|
|
if (txtName2.Text != model.RealName)
|
|
{
|
|
if (model.IFEditName == 0 || model.IFEditName == 2)
|
|
{
|
|
if (!System.Text.RegularExpressions.Regex.IsMatch(txtName2.Text.Trim(), @"[\u4e00-\u9fa5]"))
|
|
{
|
|
Response.Write("<script language='javascript'>alert('真实姓名填写不正确,只能输入中文!')</script>");
|
|
}
|
|
else
|
|
{
|
|
daoUser.UpdateuLevel("IFEditName", 1, Card);
|
|
daoUser.UpdatePassword("EditName", txtName2.Text.Trim(), Card);
|
|
Mtxfw.Utility.Tools.Message("提交修改成功,请等待管理员审核!", "/Member_editName.aspx");
|
|
}
|
|
}
|
|
else Mtxfw.Utility.Tools.Message("请不要重复提交!");
|
|
}
|
|
else Mtxfw.Utility.Tools.Message("新真实姓名不能跟旧真实姓名相同哦!");
|
|
}
|
|
else Mtxfw.Utility.Tools.Message("不能提交空值!");
|
|
}
|
|
}
|
|
} |