public Response <ListAccountSettingDto> Update(AccountSettingUpdateDto data, string token) { Response <ListAccountSettingDto> obj = new Response <ListAccountSettingDto>(); var hCliente = _global.rspClientPUT("AccountSetting/" + data.AccountSettingId, data, token); if (hCliente.IsSuccessStatusCode) { obj = new JavaScriptSerializer().Deserialize <Response <ListAccountSettingDto> >(hCliente.Content.ReadAsStringAsync().Result); } return(obj); }
public JsonResult Update(AccountSettingUpdateDto data) { #region TOKEN var sessione = (SessionModel)Session[Resources.Constante.SessionUsuario]; LoginDto oLoginDto = new LoginDto(); oLoginDto.v_UserName = sessione.UserName; oLoginDto.v_Password = sessione.Pass; var validated = _securityBL.ValidateAccess(oLoginDto); if (validated == null) { return(Json("", "application/json", Encoding.UTF8, JsonRequestBehavior.AllowGet)); } #endregion data.SystemUserId = validated.SystemUserId; data.UpdateUserId = validated.SystemUserId; var response = _accountSettingBL.Update(data, validated.Token); return(Json(response, "application/json", Encoding.UTF8, JsonRequestBehavior.AllowGet)); }