public ActionResult CWDelete(int id) { CadastralWork cw = db.CadastralWorks.Find(id); if (cw == null) { return(HttpNotFound()); } return(View(cw)); }
public ActionResult CWComplete(int id) { CadastralWork cw = db.CadastralWorks.Find(id); ViewBag.CW = cw; ViewBag.Date = DateTime.Now; // Формируем список статусов для передачи в представление SelectList status = new SelectList(db.LegalStatus, "Id", "lsName"); ViewBag.LegalStatus = status; return(View()); }
public ActionResult CWDeleteConfirmed(int id) { CadastralWork cw = db.CadastralWorks.Find(id); if (cw == null) { return(HttpNotFound()); } db.CadastralWorks.Remove(cw); db.SaveChanges(); return(RedirectToAction("ListCW")); }
public ActionResult CWCreate(CadastralWork cw, int id) { Application app = db.Applications.Find(id); if (app == null) { return(HttpNotFound()); } app.fk_status = 4; db.Entry(app).State = EntityState.Modified; db.SaveChanges(); db.CadastralWorks.Add(cw); db.SaveChanges(); return(RedirectToAction("ListCW")); }
public ActionResult CWComplete(CadastralObject co, int id) { CadastralWork cw = db.CadastralWorks.Find(id); if (cw == null) { return(HttpNotFound()); } cw.app.fk_status = 6; db.Entry(cw).State = EntityState.Modified; db.SaveChanges(); db.CadastralObjects.Add(co); db.SaveChanges(); return(RedirectToAction("ListCO", "CO")); }
public ActionResult CWEdit(int?id) { if (id == null) { return(HttpNotFound()); } // Находим в бд выбранную КР CadastralWork cw = db.CadastralWorks.Find(id); if (cw != null) { return(View(cw)); } return(RedirectToAction("ListCW")); }
public ActionResult CWEdit(CadastralWork cw) { db.Entry(cw).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("ListCW")); }