/// <summary> /// 修改成员信息 /// </summary> /// <param name="forms"></param> /// <returns></returns> public ActionResult ModifyMemberInfo(FormCollection forms) { var memberDto = new MemberDto { Id = Int32.Parse(forms["id"]), IconUrl = forms["val_icon"], Name = forms["val_name"], Width = Int32.Parse(forms["val_width"]), Height = Int32.Parse(forms["val_height"]), IsResize = Int32.Parse(forms["val_isresize"]) == 1, IsOpenMax = Int32.Parse(forms["val_isopenmax"]) == 1, IsFlash = Int32.Parse(forms["val_isflash"]) == 1 }; DeskApplicationServices.ModifyMemberInfo(Account.Id, memberDto); return Json(new { success = 1 }); }
public void ModifyMemberInfo(Int32 accountId, MemberDto member) { ValidateParameter.Validate(accountId).Validate(member); DeskContext.ModifyDeskMemberServices.ModifyMemberInfo(accountId, member.ConvertToModel<MemberDto, Member>()); UnitOfWork.Commit(); }