Ejemplo n.º 1
0
 public ActionResult EditContentRatingDetails(int id, ContentRatingModel contentRating)
 {
     try
     {
         ContentRatingRepository ContentRatingRepo = new ContentRatingRepository();
         ContentRatingRepo.UpdateContentRating(contentRating);
         var profileData = Session["UserProfile"] as UserSession;
         var logModel    = new LogModel
         {
             UserId    = profileData.UserID,
             TableName = "Content Rating",
             Activity  = "Updated Rating",
             LogDate   = DateTime.Now
         };
         var logRepository = new logRepository();
         logRepository.AddLog(logModel);
         return(RedirectToAction("GetAllContentRatingDetails"));
     }
     catch
     {
         return(RedirectToAction("GetAllContentRatingDetails"));
     }
 }