Esempio n. 1
0
        public ActionResult Create(int id)
        {
            AUTHORS_REVIEWS R = new AUTHORS_REVIEWS();

            ViewBag.CmpList = db.AUTHORS.Where(k => k.AU_ID == id).ToList();
            ViewBag.Author  = db.AUTHORS.Where(k => k.AU_ID == id).First().AU_NAME;



            return(View(R));
        }
Esempio n. 2
0
 public ActionResult CreateR(AUTHORS_REVIEWS R)
 {
     try
     {
         if (ModelState.IsValid)
         {
             db.AUTHORS_REVIEWS.Add(R);
         }
         db.SaveChanges();
         return(RedirectToAction("AuthorReviews", new { id = R.AR_AU }));
     }
     catch { return(View(R)); }
 }