public Precio Agregar(Precio precio)
 {
     try
     {
         var bc = new PrecioComponent();
         return(bc.Agregar(precio));
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         throw e;
     }
 }
 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);
     }
 }
 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);
     }
 }
 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);
     }
 }
 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);
     }
 }
Beispiel #6
0
        public List <Precio> ToList()
        {
            var bc = new PrecioComponent();

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

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

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

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

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

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

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

            return(PrecioComponent.Delete(ID));
        }
Beispiel #14
0
        public Precio GetByID(int ID)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.GetByID(ID));
        }
Beispiel #15
0
        public bool Edit(Precio Precio)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.Edit(Precio));
        }
Beispiel #16
0
        public Precio Create(Precio Precio)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.Agregar(Precio));
        }
Beispiel #17
0
        public Precio Agregar(Precio precio)
        {
            var bc = new PrecioComponent();

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

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

            bc.Delete(id);
        }
Beispiel #20
0
        public Precio Editar(Precio precio)
        {
            var bc = new PrecioComponent();

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

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

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

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

            return(bc.Read());
        }
Beispiel #25
0
        public Precio Add(Precio precio)
        {
            var bc = new PrecioComponent();

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

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

            bc.Edit(precio);
        }