public ActionResult DeleteConfirmed(int id)
        {
            PharmacyOrders pharmacyOrders = db.PharmacyOrders.Find(id);

            db.PharmacyOrders.Remove(pharmacyOrders);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,Time,Date,PatientAdmitionId")] PharmacyOrders pharmacyOrders)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pharmacyOrders).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PatientAdmitionId = new SelectList(db.PatientAdmition, "ID", "ID", pharmacyOrders.PatientAdmitionId);
     return(View(pharmacyOrders));
 }
        // GET: Phamarcy/PharmacyOrders/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PharmacyOrders pharmacyOrders = db.PharmacyOrders.Find(id);

            if (pharmacyOrders == null)
            {
                return(HttpNotFound());
            }
            return(View(pharmacyOrders));
        }
        // GET: Phamarcy/PharmacyOrders/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PharmacyOrders pharmacyOrders = db.PharmacyOrders.Find(id);

            if (pharmacyOrders == null)
            {
                return(HttpNotFound());
            }
            ViewBag.PatientAdmitionId = new SelectList(db.PatientAdmition, "ID", "ID", pharmacyOrders.PatientAdmitionId);
            return(View(pharmacyOrders));
        }
Exemplo n.º 5
0
 public PharmacyOrders FindOrders(PharmacyOrders order)
 {
     _log.LogError("");
     return(_repository.Find <PharmacyOrders>(O => O.ID == order.ID));
 }
Exemplo n.º 6
0
 public bool RemoveOrder(PharmacyOrders order)
 {
     _log.LogError("");
     return(_repository.Delete <PharmacyOrders>(order));
 }
Exemplo n.º 7
0
 public bool EditOrder(PharmacyOrders order)
 {
     _log.LogError("");
     return(_repository.Update <PharmacyOrders>(order));
 }
Exemplo n.º 8
0
 public bool RecoredOrder(PharmacyOrders order)
 {
     _log.LogError("");
     return(_repository.Create <PharmacyOrders>(order));
 }