public ActionResult DeleteConfirmed(int id) { OrgCur orgCur = db.OrgCurs.Find(id); db.OrgCurs.Remove(orgCur); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "OrgCurId,Ogrn,Socrnameorg")] OrgCur orgCur) { if (ModelState.IsValid) { db.Entry(orgCur).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(orgCur)); }
public ActionResult Create([Bind(Include = "OrgCurId,Ogrn,Socrnameorg")] OrgCur orgCur) { if (ModelState.IsValid) { db.OrgCurs.Add(orgCur); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(orgCur)); }
// GET: OrgCur/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OrgCur orgCur = db.OrgCurs.Find(id); if (orgCur == null) { return(HttpNotFound()); } return(View(orgCur)); }