60 lines
2.0 KiB
C#
60 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using Maticsoft.Model;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using Ajax;
|
|
public partial class Framework_File_Userinfo : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
Utility.RegisterTypeForAjax(typeof(Framework_File_Userinfo));
|
|
if (Session["user"] == null)
|
|
{
|
|
Response.Redirect("../index.aspx");
|
|
}
|
|
nr_z_yhzh zh = (nr_z_yhzh)Session["user"];
|
|
usezh.InnerText = zh.zhanghao;
|
|
upuserzh.Value = zh.zhanghao;
|
|
userzhid.Value = zh.id.ToString();
|
|
string dz = DBHlper.getfirstcolmn("select touxiang from view_nr_z_yhzh where id=" +zh.id);
|
|
usetx.Src = dz;
|
|
DataTable dtuserinfo = DBHlper.Execute("select * from nr_sysuserinfo").Tables[0];
|
|
if (dtuserinfo.Rows.Count > 0)
|
|
{
|
|
usezcrq.InnerText =dtuserinfo.Rows[0]["zcrq"].ToString();
|
|
//zcqyxx.InnerText = dtuserinfo.Rows[0]["mingcheng"].ToString();
|
|
//zcdizhi.InnerText = dtuserinfo.Rows[0]["dizhi"].ToString();
|
|
}
|
|
}
|
|
#region 修改密码
|
|
[Ajax.AjaxMethod(Ajax.HttpSessionStateRequirement.ReadWrite)]
|
|
public string updateusermima(string yhid,string yhymima, string upxmima)
|
|
{
|
|
DataSet yhds=DBHlper.Execute(" select * from nr_z_yhzh where id='" + yhid + "'");
|
|
string ymima = DBHlper.getmima(yhymima);
|
|
if (yhds.Tables[0].Rows[0]["mima"].ToString() != ymima)
|
|
{
|
|
return "输入的原始密码不符合!";
|
|
}
|
|
else
|
|
{
|
|
string xyhmm = DBHlper.getmima(upxmima);
|
|
int xgjg = DBHlper.excutecmd("update nr_z_yhzh set mima='" + xyhmm + "' where id='" + yhid + "'");
|
|
if (xgjg > 0)
|
|
{
|
|
return "1";
|
|
}
|
|
else
|
|
{
|
|
return "修改密码操作失败!";
|
|
}
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
} |