public ActionResult Create(FormCollection collection)
 {
     try
     {
         if (ModelState.IsValid)
         {
             DiningCookingType dcc = new DiningCookingType();
             TryUpdateModel <DiningCookingType>(dcc, collection);
             dcc.CREATEDATE = DateTime.Now;
             dcc.CREATEUSER = Session["Username"].ToString();
             // TODO: Add insert logic here
             new CookingTypeManager().AddCookingClass(dcc);
         }
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
예제 #2
0
 public void AddCookingClass(DiningCookingType dcc)
 {
     dbInstance.Context.Insert <DiningCookingType>(dcc);
 }