コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PFAMaster pFAMaster = db.PFAMasters.Find(id);

            db.PFAMasters.Remove(pFAMaster);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "PFAId,PFAName,CreatedDate,IsDeleted")] PFAMaster pFAMaster)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pFAMaster).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(pFAMaster));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "PFAId,PFAName,CreatedDate,IsDeleted")] PFAMaster pFAMaster)
        {
            if (ModelState.IsValid)
            {
                db.PFAMasters.Add(pFAMaster);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(pFAMaster));
        }
コード例 #4
0
        // GET: PFAMasters/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PFAMaster pFAMaster = db.PFAMasters.Find(id);

            if (pFAMaster == null)
            {
                return(HttpNotFound());
            }
            return(View(pFAMaster));
        }