public ActionResult DeleteConfirmed(int id) { Designer_service designer_service = db.Designer_service.Find(id); db.Designer_service.Remove(designer_service); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Designer_id,Last_updata_date,Service_details_Id,Service_type_id,Service_id")] Designer_service designer_service) { if (ModelState.IsValid) { db.Entry(designer_service).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Designer_id = new SelectList(db.Designer, "Designer_id", "Account", designer_service.Designer_id); ViewBag.Service_id = new SelectList(db.Service, "Service_id", "Service_name", designer_service.Service_id); ViewBag.Service_details_Id = new SelectList(db.Service_details, "Service_details_Id", "Name", designer_service.Service_details_Id); ViewBag.Service_type_id = new SelectList(db.Service_types, "Type_id", "Type_name", designer_service.Service_type_id); return(View(designer_service)); }
// GET: Designer_service/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Designer_service designer_service = db.Designer_service.Find(id); if (designer_service == null) { return(HttpNotFound()); } return(View(designer_service)); }
// GET: Designer_service/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Designer_service designer_service = db.Designer_service.Find(id); if (designer_service == null) { return(HttpNotFound()); } ViewBag.Designer_id = new SelectList(db.Designer, "Designer_id", "Account", designer_service.Designer_id); ViewBag.Service_id = new SelectList(db.Service, "Service_id", "Service_name", designer_service.Service_id); ViewBag.Service_details_Id = new SelectList(db.Service_details, "Service_details_Id", "Name", designer_service.Service_details_Id); ViewBag.Service_type_id = new SelectList(db.Service_types, "Type_id", "Type_name", designer_service.Service_type_id); return(View(designer_service)); }