public ActionResult DeleteConfirmed(int id)
        {
            Service_types service_types = db.Service_types.Find(id);

            db.Service_types.Remove(service_types);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Type_id,Type_name,Type_description,Service_id")] Service_types service_types)
 {
     if (ModelState.IsValid)
     {
         db.Entry(service_types).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Service_id = new SelectList(db.Service, "Service_id", "Service_name", service_types.Service_id);
     return(View(service_types));
 }
        // GET: Service_types/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Service_types service_types = db.Service_types.Find(id);

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

            if (service_types == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Service_id = new SelectList(db.Service, "Service_id", "Service_name", service_types.Service_id);
            return(View(service_types));
        }