Ejemplo n.º 1
0
 public Precio Agregar(Precio precio)
 {
     try
     {
         var bc = new PrecioComponent();
         return(bc.Agregar(precio));
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         throw e;
     }
 }
Ejemplo n.º 2
0
 public void Actualizar(PrecioRequest request)
 {
     try
     {
         var bc = new PrecioComponent();
         bc.Edit(request.Precio);
     }
     catch (Exception ex)
     {
         var httpError = new HttpResponseMessage()
         {
             StatusCode   = (HttpStatusCode)422,
             ReasonPhrase = ex.Message
         };
         throw new HttpResponseException(httpError);
     }
 }
Ejemplo n.º 3
0
 public ListarTodosPrecioResponse ListarTodos()
 {
     try
     {
         var response = new ListarTodosPrecioResponse();
         var bc       = new PrecioComponent();
         response.Result = bc.ToList();
         return(response);
     }
     catch (Exception ex)
     {
         var httpError = new HttpResponseMessage()
         {
             StatusCode   = (HttpStatusCode)422,
             ReasonPhrase = ex.Message
         };
         throw new HttpResponseException(httpError);
     }
 }
Ejemplo n.º 4
0
 public PrecioResponse LeerPorId(int id)
 {
     try
     {
         var response = new PrecioResponse();
         var bc       = new PrecioComponent();
         response.Result = bc.Find(id);
         return(response);
     }
     catch (Exception ex)
     {
         var httpError = new HttpResponseMessage()
         {
             StatusCode   = (HttpStatusCode)422,
             ReasonPhrase = ex.Message
         };
         throw new HttpResponseException(httpError);
     }
 }
Ejemplo n.º 5
0
 public PrecioResponse Agregar(PrecioRequest request)
 {
     try
     {
         var response = new PrecioResponse();
         var bc       = new PrecioComponent();
         response.Result = bc.Add(request.Precio);
         return(response);
     }
     catch (Exception ex)
     {
         var httpError = new HttpResponseMessage()
         {
             StatusCode   = (HttpStatusCode)422,
             ReasonPhrase = ex.Message
         };
         throw new HttpResponseException(httpError);
     }
 }
Ejemplo n.º 6
0
        public List <Precio> ToList()
        {
            var bc = new PrecioComponent();

            return(bc.ToList());
        }
Ejemplo n.º 7
0
        public void Remove(Precio precio)
        {
            var bc = new PrecioComponent();

            bc.Remove(precio);
        }
Ejemplo n.º 8
0
        public Precio Find(int?id)
        {
            var bc = new PrecioComponent();

            return(bc.Find(id));
        }
Ejemplo n.º 9
0
        public void Eliminar(Precio precio)
        {
            var bc = new PrecioComponent();

            bc.Eliminar(precio);
        }
Ejemplo n.º 10
0
        public List <Precio> ListarTodos()
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.ListarTodos());
        }
Ejemplo n.º 11
0
        public List <Precio> ListarTodos()
        {
            var bc = new PrecioComponent();

            return(bc.ListarTodos());
        }
Ejemplo n.º 12
0
        public List <Precio> BuscarPorTipoServicio(int tipoServicioId)
        {
            var bc = new PrecioComponent();

            return(bc.BuscarPorTipoServicio(tipoServicioId));
        }
Ejemplo n.º 13
0
        public bool Delete(Precio ID)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.Delete(ID));
        }
Ejemplo n.º 14
0
        public Precio GetByID(int ID)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.GetByID(ID));
        }
Ejemplo n.º 15
0
        public bool Edit(Precio Precio)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.Edit(Precio));
        }
Ejemplo n.º 16
0
        public Precio Create(Precio Precio)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.Agregar(Precio));
        }
Ejemplo n.º 17
0
        public Precio Agregar(Precio precio)
        {
            var bc = new PrecioComponent();

            return(bc.Agregar(precio));
        }
Ejemplo n.º 18
0
        public Precio BuscarPorId(int id)
        {
            var bc = new PrecioComponent();

            return(bc.Details(id));
        }
Ejemplo n.º 19
0
        public void Delete(int id)
        {
            var bc = new PrecioComponent();

            bc.Delete(id);
        }
Ejemplo n.º 20
0
        public Precio Editar(Precio precio)
        {
            var bc = new PrecioComponent();

            return(bc.Editar(precio));
        }
Ejemplo n.º 21
0
        public Precio ReadBy(int id)
        {
            var bc = new PrecioComponent();

            return(bc.ReadBy(id));
        }
Ejemplo n.º 22
0
        public Precio Eliminar(int id)
        {
            var bc = new PrecioComponent();

            return(bc.Eliminar(id));
        }
Ejemplo n.º 23
0
        public Precio Ver(Precio precio)
        {
            var bc = new PrecioComponent();

            return(bc.Ver(precio));
        }
Ejemplo n.º 24
0
        public List <Precio> Read()
        {
            var bc = new PrecioComponent();

            return(bc.Read());
        }
Ejemplo n.º 25
0
        public Precio Add(Precio precio)
        {
            var bc = new PrecioComponent();

            return(bc.Add(precio));
        }
Ejemplo n.º 26
0
        public void Update(Precio objeto)
        {
            var bc = new PrecioComponent();

            bc.Update(objeto);
        }
Ejemplo n.º 27
0
        public void Edit(Precio precio)
        {
            var bc = new PrecioComponent();

            bc.Edit(precio);
        }