示例#1
0
        // GET: Precio/Details/5
        public ActionResult Details(int id)
        {
            IPrecioService precioService = new PrecioService();
            var            lista         = precioService.ListarTodos();

            return(View(lista));
        }
示例#2
0
        // GET: Precio
        public ActionResult Index()
        {
            IPrecioService precioService = new PrecioService();
            var            lista         = precioService.ListarTodos();

            return(View(lista));
        }
示例#3
0
 public ActionResult Delete(Precio modelo)
 {
     try
     {
         // TODO: Add delete logic here
         IPrecioService precioService = new PrecioService();
         precioService.Eliminar(modelo.Id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
示例#4
0
 public ActionResult Edit(Precio modelo)
 {
     try
     {
         // TODO: Add update logic here
         IPrecioService precioService = new PrecioService();
         precioService.Editar(modelo);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
示例#5
0
        public ActionResult Create(Precio modelo)
        {
            try
            {
                // TODO: Add insert logic here

                IPrecioService precioService = new PrecioService();
                precioService.Agregar(modelo);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
示例#6
0
 public PrecioController(PrecioService process, IApiProcess <TipoServicio> TipoSerprocess)
 {
     this.process        = process;
     this.TipoSerprocess = TipoSerprocess;
 }