示例#1
0
 //更新用户基本信息
 public string updateUserBaseinfo(string id, string userName, string userAddress, string userSex, string userMarry, string userBirthday, string userDes)
 {
     curUser              = user.GetModel(Convert.ToInt32(id));
     curUser.userName     = userName;
     curUser.userAddress  = userAddress;
     curUser.userSex      = userSex;
     curUser.userMarry    = userMarry;
     curUser.userBirthday = userBirthday;
     curUser.userDes      = userDes;
     return(user.Update(curUser).ToString());
 }
 public string[] userAddress = new string[3]; //用户所在地
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["userid"] == null || Session["userid"].ToString() == "")
     {
         Response.Redirect("login.aspx");
     }
     loginUserid = Session["userid"].ToString();
     qsUserid    = Request.QueryString["Userid"];
     curUser     = user.GetModel(Convert.ToInt32(qsUserid));//获得当前用户对象
     if (curUser.userAddress != null && curUser.userAddress != "")
     {
         userAddress = curUser.userAddress.Split('-');
     }
     else
     {
         userAddress = new string[] { "未设置", "未设置", "未设置" };
     }
     focusCountd = relation.GetRecordCount("userId=" + curUser.id.ToString());
     fansCount   = relation.GetRecordCount("friendId=" + curUser.id.ToString());
     blogCount   = blog.GetRecordCount("blogAuthorId=" + curUser.id.ToString());
 }