Beispiel #1
0
        public ActionResult DeleteConfirmed(short id)
        {
            tbl_CustomerBooking tbl_CustomerBooking = db.tbl_CustomerBooking.Find(id);

            db.tbl_CustomerBooking.Remove(tbl_CustomerBooking);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        // GET: tbl_CustomerBooking/Details/5
        public ActionResult Details(short?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_CustomerBooking tbl_CustomerBooking = db.tbl_CustomerBooking.Find(id);

            if (tbl_CustomerBooking == null)
            {
                return(HttpNotFound());
            }
            return(View(tbl_CustomerBooking));
        }
Beispiel #3
0
 public ActionResult Edit([Bind(Include = "id,medicalBillId,serviceUnitId,bookingDate,comingDate,officeId,productId,quantity,servicePrice,payment,debt,payMethod,createdTime,updatedTime,createdBy,updatedBy")] tbl_CustomerBooking tbl_CustomerBooking)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_CustomerBooking).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.medicalBillId = new SelectList(db.tbl_MedicalBill, "id", "billCode", tbl_CustomerBooking.medicalBillId);
     ViewBag.medicalBillId = new SelectList(db.tbl_MedicalBill, "id", "billCode", tbl_CustomerBooking.medicalBillId);
     ViewBag.officeId      = new SelectList(db.tbl_Office, "id", "name", tbl_CustomerBooking.officeId);
     ViewBag.officeId      = new SelectList(db.tbl_Office, "id", "name", tbl_CustomerBooking.officeId);
     ViewBag.productId     = new SelectList(db.tbl_Product, "id", "productCode", tbl_CustomerBooking.productId);
     ViewBag.productId     = new SelectList(db.tbl_Product, "id", "productCode", tbl_CustomerBooking.productId);
     ViewBag.serviceUnitId = new SelectList(db.tbl_ServiceUnit, "id", "name", tbl_CustomerBooking.serviceUnitId);
     ViewBag.serviceUnitId = new SelectList(db.tbl_ServiceUnit, "id", "name", tbl_CustomerBooking.serviceUnitId);
     return(View(tbl_CustomerBooking));
 }
Beispiel #4
0
        // GET: tbl_CustomerBooking/Edit/5
        public ActionResult Edit(short?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_CustomerBooking tbl_CustomerBooking = db.tbl_CustomerBooking.Find(id);

            if (tbl_CustomerBooking == null)
            {
                return(HttpNotFound());
            }
            ViewBag.medicalBillId = new SelectList(db.tbl_MedicalBill, "id", "billCode", tbl_CustomerBooking.medicalBillId);
            ViewBag.medicalBillId = new SelectList(db.tbl_MedicalBill, "id", "billCode", tbl_CustomerBooking.medicalBillId);
            ViewBag.officeId      = new SelectList(db.tbl_Office, "id", "name", tbl_CustomerBooking.officeId);
            ViewBag.officeId      = new SelectList(db.tbl_Office, "id", "name", tbl_CustomerBooking.officeId);
            ViewBag.productId     = new SelectList(db.tbl_Product, "id", "productCode", tbl_CustomerBooking.productId);
            ViewBag.productId     = new SelectList(db.tbl_Product, "id", "productCode", tbl_CustomerBooking.productId);
            ViewBag.serviceUnitId = new SelectList(db.tbl_ServiceUnit, "id", "name", tbl_CustomerBooking.serviceUnitId);
            ViewBag.serviceUnitId = new SelectList(db.tbl_ServiceUnit, "id", "name", tbl_CustomerBooking.serviceUnitId);
            return(View(tbl_CustomerBooking));
        }