public PersonalInfoUpdateResponse Execute(PersonalInfoUpdateRequest request) { PersonalInfoUpdateResponse infoUpdateResponse = new PersonalInfoUpdateResponse(); UserInfo entity = ServiceHelper.LoadService <IUserService>().Get(request.UserId); entity.Name = request.Name; entity.Gender = request.Gender; ServiceHelper.LoadService <IUserService>().Update(entity); return(infoUpdateResponse); }
private void btnOK_Click(object sender, RoutedEventArgs e) { if (this.model == null) { return; } if (string.IsNullOrEmpty(this.model.Name)) { int num = (int)MessageBox.Show("请输入姓名", "提示"); } else { PersonalInfoUpdateResponse infoUpdateResponse = LocalApi.Execute(new PersonalInfoUpdateRequest() { Gender = this.model.Gender, Name = this.model.Name, UserId = this.model.UserId }); this.DialogResult = new bool?(true); this.Close(); } }