Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CTestShare cTestShare = db.CTestShares.Find(id);

            db.CTestShares.Remove(cTestShare);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "CTestShareID,FCTestID,ShareBy,ShareTo,Password,ShareDate")] CTestShare cTestShare)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cTestShare).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FCTestID = new SelectList(db.CTests, "CTestID", "CTNote", cTestShare.FCTestID);
     return(View(cTestShare));
 }
Ejemplo n.º 3
0
        // GET: CTestShare/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CTestShare cTestShare = db.CTestShares.Find(id);

            if (cTestShare == null)
            {
                return(HttpNotFound());
            }
            return(View(cTestShare));
        }
Ejemplo n.º 4
0
        // GET: CTestShare/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CTestShare cTestShare = db.CTestShares.Find(id);

            if (cTestShare == null)
            {
                return(HttpNotFound());
            }
            ViewBag.FCTestID = new SelectList(db.CTests, "CTestID", "CTNote", cTestShare.FCTestID);
            return(View(cTestShare));
        }