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

            db.ViewProjectDetails.Remove(viewProjectDetails);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "Id,Project,CodeName,Status,AssignedTo,Task")] ViewProjectDetails viewProjectDetails)
 {
     if (ModelState.IsValid)
     {
         db.Entry(viewProjectDetails).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(viewProjectDetails));
 }
コード例 #3
0
        public ActionResult Create([Bind(Include = "Id,Project,CodeName,Status,AssignedTo,Task")] ViewProjectDetails viewProjectDetails)
        {
            if (ModelState.IsValid)
            {
                db.ViewProjectDetails.Add(viewProjectDetails);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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