Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SearchLog searchlog = db.SearchLogs.Find(id);

            db.SearchLogs.Remove(searchlog);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        //
        // GET: /SearchLogMgmt/Details/5

        public ActionResult Details(int id = 0)
        {
            SearchLog searchlog = db.SearchLogs.Find(id);

            if (searchlog == null)
            {
                return(HttpNotFound());
            }
            return(View(searchlog));
        }
Esempio n. 3
0
 public ActionResult Edit(SearchLog searchlog)
 {
     if (ModelState.IsValid)
     {
         db.Entry(searchlog).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.keywordType = new SelectList(db.Keywords, "type", "name", searchlog.keywordType);
     ViewBag.searchId    = new SelectList(db.Searches, "id", "question", searchlog.searchId);
     return(View(searchlog));
 }
Esempio n. 4
0
        //
        // GET: /SearchLogMgmt/Edit/5

        public ActionResult Edit(int id = 0)
        {
            SearchLog searchlog = db.SearchLogs.Find(id);

            if (searchlog == null)
            {
                return(HttpNotFound());
            }
            ViewBag.keywordType = new SelectList(db.Keywords, "type", "name", searchlog.keywordType);
            ViewBag.searchId    = new SelectList(db.Searches, "id", "question", searchlog.searchId);
            return(View(searchlog));
        }