public ActionResult DeleteConfirmed(Guid id) { t_alarmnotes t_alarmnotes = db.AlarmNotesList.Find(id); db.AlarmNotesList.Remove(t_alarmnotes); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Code,Name,Opening,Closed,Price,Highest,Lower,Date,Time,Closing,Volume")] t_alarmnotes t_alarmnotes) { if (ModelState.IsValid) { db.Entry(t_alarmnotes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(t_alarmnotes)); }
public ActionResult Create([Bind(Include = "Id,Code,Name,Opening,Closed,Price,Highest,Lower,Date,Time,Closing,Volume")] t_alarmnotes t_alarmnotes) { if (ModelState.IsValid) { t_alarmnotes.Id = Guid.NewGuid(); db.AlarmNotesList.Add(t_alarmnotes); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(t_alarmnotes)); }
// GET: Alarmnotes/Delete/5 public ActionResult Delete(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } t_alarmnotes t_alarmnotes = db.AlarmNotesList.Find(id); if (t_alarmnotes == null) { return(HttpNotFound()); } return(View(t_alarmnotes)); }