public ActionResult DeleteConfirmed(Guid id) { RecognizeMe recognizeMe = db.RecognizeMes.Find(id); db.RecognizeMes.Remove(recognizeMe); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,firstName,lastName,bussinessUnit,description,award")] RecognizeMe recognizeMe) { if (ModelState.IsValid) { db.Entry(recognizeMe).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(recognizeMe)); }
public ActionResult Create([Bind(Include = "ID,firstName,lastName,bussinessUnit,description,coreValue")] RecognizeMe recognizeMe) { if (ModelState.IsValid) { recognizeMe.ID = Guid.NewGuid(); db.RecognizeMes.Add(recognizeMe); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(recognizeMe)); }
public ActionResult Create([Bind(Include = "recognitionID,ID,bussinessUnit,description,CoreValue,CurrentDateTime")] RecognizeMe recognizeMe) { if (ModelState.IsValid) { recognizeMe.CurrentDateTime = DateTime.Now; db.RecognizeMes.Add(recognizeMe); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID = new SelectList(db.AccountDetails, "ID", "fullName", recognizeMe.ID); return(View(recognizeMe)); }
// GET: RecognizeMe3/Delete/5 public ActionResult Delete(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RecognizeMe recognizeMe = db.RecognizeMes.Find(id); if (recognizeMe == null) { return(HttpNotFound()); } return(View(recognizeMe)); }
public ActionResult Edit([Bind(Include = "recognitionID,ID,bussinessUnit,description,CoreValue,CurrentDateTime")] RecognizeMe recognizeMe) { // if (ModelState.IsValid) { Guid rID; Guid.TryParse(TempData["user"].ToString(), out rID); recognizeMe.ID = rID; db.Entry(recognizeMe).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID = new SelectList(db.AccountDetails, "ID", "fullName", recognizeMe.ID); return(View(recognizeMe)); }
// GET: RecognizeMes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RecognizeMe recognizeMe = db.RecognizeMes.Find(id); TempData["user"] = recognizeMe.ID; if (recognizeMe == null) { return(HttpNotFound()); } ViewBag.ID = new SelectList(db.AccountDetails, "ID", "fullName", recognizeMe.ID); return(View(recognizeMe)); }