Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SpecialServiceDay specialServiceDay = db.SpecialServiceDays.Find(id);

            db.SpecialServiceDays.Remove(specialServiceDay);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "SpecialServiceDayID,Date,ServiceAddressID")] SpecialServiceDay specialServiceDay)
 {
     if (ModelState.IsValid)
     {
         db.Entry(specialServiceDay).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ServiceAddressID = new SelectList(db.ServiceAddresses, "ServiceAddressID", "Address1", specialServiceDay.ServiceAddressID);
     return(View(specialServiceDay));
 }
Esempio n. 3
0
        // GET: SpecialServiceDays/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SpecialServiceDay specialServiceDay = db.SpecialServiceDays.Find(id);

            if (specialServiceDay == null)
            {
                return(HttpNotFound());
            }
            return(View(specialServiceDay));
        }
Esempio n. 4
0
        // GET: SpecialServiceDays/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SpecialServiceDay specialServiceDay = db.SpecialServiceDays.Find(id);

            if (specialServiceDay == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ServiceAddressID = new SelectList(db.ServiceAddresses, "ServiceAddressID", "Address1", specialServiceDay.ServiceAddressID);
            return(View(specialServiceDay));
        }