コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            OrgCur orgCur = db.OrgCurs.Find(id);

            db.OrgCurs.Remove(orgCur);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        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));
        }
コード例 #4
0
        // 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));
        }