示例#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;
     }
 }
 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);
     }
 }
示例#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);
        }