Esempio n. 1
0
 public ActionResult CreateAudiences(DIC_AUDIENCE rank)
 {
     try
     {
         if (ModelState.IsValid)
         {
             var s = rank.DAU_NAME;
             if ((from c in ctx.DIC_AUDIENCE where c.DAU_NAME == s select c).Any()) { }
             else
             {
                 ctx.DIC_AUDIENCE.Add(rank);
                 ctx.SaveChanges();
             }
             return RedirectToAction("AllAudiences");
         }
     }
     catch
     {
         return RedirectToAction("Problem");
     }
     return View();
 }
Esempio n. 2
0
 public ActionResult Create()
 {
     DIC_AUDIENCE aud = new DIC_AUDIENCE();
     return View(aud);
 }