Exemplo n.º 1
0
 public ActionResult CreateRanks(DIC_DEGREE rank)
 {
     try
     {
         if (ModelState.IsValid)
         {
             var s = rank.DDG_NAME;
             if ((from c in ctx.DIC_DEGREE where c.DDG_NAME == s select c).Any()) { }
             else
             {
                 ctx.DIC_DEGREE.Add(rank);
                 ctx.SaveChanges();
             }
             return RedirectToAction("AllDegrees");
         }
     }
     catch
     {
         return RedirectToAction("Problem");
     }
     return View();
 }
Exemplo n.º 2
0
 public ActionResult Create()
 {
     DIC_DEGREE rank = new DIC_DEGREE();
     return View(rank);
 }