public Response <ListQuoteTrackingDto> Update(QuoteTrackingUpdateDto data, string token) { Response <ListQuoteTrackingDto> obj = null; var hCliente = _global.rspClientPUT("QuoteTracking/" + data.QuoteTrackingId, data, token); if (hCliente.IsSuccessStatusCode) { obj = new JavaScriptSerializer().Deserialize <Response <ListQuoteTrackingDto> >(hCliente.Content.ReadAsStringAsync().Result); } return(obj); }
public JsonResult Update(QuoteTrackingUpdateDto 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 var response = _quoteTrackingBL.Update(data, validated.Token); return(Json(response, "application/json", Encoding.UTF8, JsonRequestBehavior.AllowGet)); }