Пример #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;
     }
 }
Пример #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);
     }
 }
Пример #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);
     }
 }
Пример #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);
     }
 }
Пример #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);
     }
 }
Пример #6
0
        public List <Precio> ToList()
        {
            var bc = new PrecioComponent();

            return(bc.ToList());
        }
Пример #7
0
        public void Remove(Precio precio)
        {
            var bc = new PrecioComponent();

            bc.Remove(precio);
        }
Пример #8
0
        public Precio Find(int?id)
        {
            var bc = new PrecioComponent();

            return(bc.Find(id));
        }
Пример #9
0
        public void Eliminar(Precio precio)
        {
            var bc = new PrecioComponent();

            bc.Eliminar(precio);
        }
Пример #10
0
        public List <Precio> ListarTodos()
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.ListarTodos());
        }
Пример #11
0
        public List <Precio> ListarTodos()
        {
            var bc = new PrecioComponent();

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

            return(bc.BuscarPorTipoServicio(tipoServicioId));
        }
Пример #13
0
        public bool Delete(Precio ID)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.Delete(ID));
        }
Пример #14
0
        public Precio GetByID(int ID)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.GetByID(ID));
        }
Пример #15
0
        public bool Edit(Precio Precio)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.Edit(Precio));
        }
Пример #16
0
        public Precio Create(Precio Precio)
        {
            PrecioComponent PrecioComponent = new PrecioComponent();

            return(PrecioComponent.Agregar(Precio));
        }
Пример #17
0
        public Precio Agregar(Precio precio)
        {
            var bc = new PrecioComponent();

            return(bc.Agregar(precio));
        }
Пример #18
0
        public Precio BuscarPorId(int id)
        {
            var bc = new PrecioComponent();

            return(bc.Details(id));
        }
Пример #19
0
        public void Delete(int id)
        {
            var bc = new PrecioComponent();

            bc.Delete(id);
        }
Пример #20
0
        public Precio Editar(Precio precio)
        {
            var bc = new PrecioComponent();

            return(bc.Editar(precio));
        }
Пример #21
0
        public Precio ReadBy(int id)
        {
            var bc = new PrecioComponent();

            return(bc.ReadBy(id));
        }
Пример #22
0
        public Precio Eliminar(int id)
        {
            var bc = new PrecioComponent();

            return(bc.Eliminar(id));
        }
Пример #23
0
        public Precio Ver(Precio precio)
        {
            var bc = new PrecioComponent();

            return(bc.Ver(precio));
        }
Пример #24
0
        public List <Precio> Read()
        {
            var bc = new PrecioComponent();

            return(bc.Read());
        }
Пример #25
0
        public Precio Add(Precio precio)
        {
            var bc = new PrecioComponent();

            return(bc.Add(precio));
        }
Пример #26
0
        public void Update(Precio objeto)
        {
            var bc = new PrecioComponent();

            bc.Update(objeto);
        }
Пример #27
0
        public void Edit(Precio precio)
        {
            var bc = new PrecioComponent();

            bc.Edit(precio);
        }