private void DoAddMember(string Pid, string Name, string Photo, string Sex, string Birthday, string Relation) { User _user = new User() { Pid = long.Parse(Pid), Name = Name, Birthday = DatetimeUtil.GetUnixTimeStamp(Birthday), Sex = Sex, Photourl = Photo, Relation = Relation }; UserRequest _userRequest = new UserRequest(); ServerResponse _serverResponse = _userRequest.AddMember(_user, false, string.Empty); Response.Write(JsonUtil.SerializeObject(_serverResponse)); Response.End(); }
protected void Page_Load(object sender, EventArgs e) { if ("POST" == Request.HttpMethod) { //提交数据 string _name = Request["name"]; string _phoneNum = Request["phoneNum"]; string _sex = Request["sex"]; string _birthday = Request["birthday"]; string _userId = Request["userId"]; Family.Entity.User _user = new Family.Entity.User() { Name = _name, PhoneNum = _phoneNum, Sex = _sex, Birthday = DatetimeUtil.GetUnixTimeStamp(_birthday), UserId = _userId }; RegisterUser(_user); } }