Example #1
0
        // GET: TipoCocina/Edit/5
        public ActionResult Edit(string id)
        {
            TipoCocinaViewModel tip = null;

            SessionInitialize();
            TipoCocinaEN tipEN = new TipoCocinaCAD(session).ReadOIDDefault(id);

            tip = new AssemblerTipoCocina().ConvertENToModelUI(tipEN);
            SessionClose();
            return(View(tip));
        }
Example #2
0
 public ActionResult Delete(TipoCocinaViewModel tip)
 {
     try
     {
         // TODO: Add delete logic here
         new TipoCocinaCEN().Destroy(tip.Tipo);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Example #3
0
 public ActionResult Create(TipoCocinaViewModel tip)
 {
     try
     {
         // TODO: Add insert logic here
         TipoCocinaCEN tipCEN = new TipoCocinaCEN();
         tipCEN.New_(tip.Tipo);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Example #4
0
        public ActionResult Edit(TipoCocinaViewModel tip)
        {
            try
            {
                // TODO: Add update logic here
                TipoCocinaCEN cen = new TipoCocinaCEN();
                cen.Modify(tip.Tipo);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Example #5
0
        // GET: TipoCocina/Create
        public ActionResult Create()
        {
            TipoCocinaViewModel tip = new TipoCocinaViewModel();

            return(View(tip));
        }