Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            projecttbl projecttbl = db.projecttbls.Find(id);

            db.projecttbls.Remove(projecttbl);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "pro_id,pro_name,pro_status")] projecttbl projecttbl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(projecttbl).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(projecttbl));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "pro_id,pro_name,pro_status")] projecttbl projecttbl)
        {
            if (ModelState.IsValid)
            {
                db.projecttbls.Add(projecttbl);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(projecttbl));
        }
Beispiel #4
0
        // GET: Addproject/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            projecttbl projecttbl = db.projecttbls.Find(id);

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