Esempio n. 1
0
 public ActionResult Create(FormCollection collection, VATCategory vatcat)
 {
     try
     {
         // TODO: Add insert logic here
         dc.VATCategories.Add(vatcat);
         dc.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View("Index"));
     }
 }
Esempio n. 2
0
        public ActionResult Edit(VATCategory vatcat, FormCollection collection)
        {
            try
            {
                // TODO: Add update logic here
                dc.Entry <VATCategory>(vatcat).State = EntityState.Modified;

                dc.SaveChanges();
                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View("Index"));
            }
        }