Exemplo n.º 1
0
 /// <summary>
 /// Obtengo la lista de Articulos
 /// </summary>
 /// <returns></returns>
 public ResultResponseArticle GetAll()
 {
     try
     {
         var    action = "Articles/GetAll";
         string json   = ServicesHelper.MethodGet(action).ToString();
         if (string.IsNullOrEmpty(json))
         {
             throw new Exception("Se ha producido un error al obtener Articles");
         }
         return(JsonConvert.DeserializeObject <ResultResponseArticle>(json));
     }
     catch (Exception ex)
     {
         throw new Exception("Se ha producido un error al obtener Articles");
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Metodo para obtener todos los Stores
 /// </summary>
 /// <returns></returns>
 public ResultResponseStore GetAllAsync()
 {
     try
     {
         var action = "Stores/GetAll";
         var json   = ServicesHelper.MethodGet(action);
         if (string.IsNullOrEmpty(json))
         {
             throw new Exception("Se ha producido un error al obtener Stores");
         }
         return(JsonConvert.DeserializeObject <ResultResponseStore>(json));
     }
     catch (Exception)
     {
         throw new Exception("Se ha producido un error al obtener Stores");
     }
 }