Beispiel #1
0
        public Response <List <ListTrackingChartModel> > Trackingchart(ParamsTrackingChartModel parameters, string token)
        {
            Response <List <ListTrackingChartModel> > obj = null;
            var hCliente = _global.rspClient("Quotation/GraficoSeguimiento/", parameters, token);

            if (hCliente.StatusCode == System.Net.HttpStatusCode.NotFound)
            {
                return(new JavaScriptSerializer().Deserialize <Response <List <ListTrackingChartModel> > >(hCliente.Content.ReadAsStringAsync().Result));
            }

            if (hCliente.IsSuccessStatusCode)
            {
                obj = new JavaScriptSerializer().Deserialize <Response <List <ListTrackingChartModel> > >(hCliente.Content.ReadAsStringAsync().Result);
            }
            return(obj);
        }
Beispiel #2
0
 public JsonResult Trackingchart(ParamsTrackingChartModel parameters)
 {
     #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
     parameters.ResponsibleSystemUserId = validated.SystemUserId;
     var response = _quotationBL.Trackingchart(parameters, validated.Token);
     return(Json(response, "application/json", Encoding.UTF8, JsonRequestBehavior.AllowGet));
 }