public ActionResult GetLawHelp(string crime = "Abetment") { ViewBag.crime_list = new SelectList(gn.Get_Crime_List(), "Text", "Value"); var law = db.law_catagry.Where(m => m.catgry_name == crime || crime == null).ToList(); return(View(law)); }
public ActionResult AddCitation() { genericsController gn = new genericsController(); ViewBag.crime_list = new SelectList(gn.Get_Crime_List(), "Text", "Value"); return(View()); }
public ActionResult AddCitation() { if (!Check_Session()) { return(RedirectToAction("SignIn", "user")); } genericsController gn = new genericsController(); ViewBag.crime_list = new SelectList(gn.Get_Crime_List(), "Text", "Value"); return(View()); }
// // GET: /Citation/Edit/5 public ActionResult Edit(int id = 0) { if (!Check_Session()) { return(RedirectToAction("SignIn", "user")); } citation citation = db.citations.Find(id); if (citation == null) { return(HttpNotFound()); } genericsController gn = new genericsController(); ViewBag.crime_list = new SelectList(gn.Get_Crime_List(), "Text", "Value"); return(View(citation)); }
public ActionResult Edit(citation citation) { if (!Check_Session()) { return(RedirectToAction("SignIn", "user")); } if (ModelState.IsValid) { db.Entry(citation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } genericsController gn = new genericsController(); ViewBag.crime_list = new SelectList(gn.Get_Crime_List(), "Text", "Value"); return(View(citation)); }