// GET: HIS10/HisNotificationLogs/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HisNotificationLog hisNotificationLog = db.HisNotificationLogs.Find(id); if (hisNotificationLog == null) { return(HttpNotFound()); } HisNotificationRecipient recipient = db.HisNotificationRecipients.Where(s => s.HisNotificationId == id).FirstOrDefault(); ViewBag.getNotificationLogs = db.HisNotificationLogs.Where(s => s.HisNotificationRecipientId == recipient.Id).ToList(); HisNotificationRecipient Recipients = db.HisNotificationRecipients.Where(s => s.HisNotificationId == id).FirstOrDefault(); //ViewBag.getNotificationLogs = db.HisNotificationLogs.Where(); ViewBag.getNotificationLogs = db.HisNotificationLogs.Where(s => s.HisNotificationRecipient.HisNotification.Id == id).First(); return(View(hisNotificationLog)); }
public ActionResult DeleteConfirmed(int id) { HisNotificationLog hisNotificationLog = db.HisNotificationLogs.Find(id); db.HisNotificationLogs.Remove(hisNotificationLog); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,HisNotificationId,DtSending,Status,Remarks")] HisNotificationLog hisNotificationLog) { if (ModelState.IsValid) { db.Entry(hisNotificationLog).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.HisNotificationId = new SelectList(db.HisNotifications, "Id", "RecType", hisNotificationLog.HisNotificationRecipientId); return(View(hisNotificationLog)); }
public ActionResult Create([Bind(Include = "Id,HisNotificationId,DtSending,Status,Remarks")] HisNotificationLog hisNotificationLog) { if (ModelState.IsValid) { db.HisNotificationLogs.Add(hisNotificationLog); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.HisNotificationId = new SelectList(db.HisNotifications, "Id", "RecType", hisNotificationLog.HisNotificationId); return(View(hisNotificationLog)); }
// GET: HIS10/HisNotificationLogs/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HisNotificationLog hisNotificationLog = db.HisNotificationLogs.Find(id); if (hisNotificationLog == null) { return(HttpNotFound()); } return(View(hisNotificationLog)); }
// GET: HIS10/HisNotificationLogs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HisNotificationLog hisNotificationLog = db.HisNotificationLogs.Find(id); if (hisNotificationLog == null) { return(HttpNotFound()); } ViewBag.HisNotificationId = new SelectList(db.HisNotifications, "Id", "RecType", hisNotificationLog.HisNotificationRecipientId); return(View(hisNotificationLog)); }