public ActionResult DeleteConfirmed(Guid id) { DSTree dSTree = db.DSTree.Find(id); db.DSTree.Remove(dSTree); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DSTreeGUID,ModGUID,ID,PID,FactorName,FactorNameCn,Operator,OperatorCn,FactorValue,FactorValueCn,Describe,DescribeCn,Result,ResultCn,CoverCount,ErroCount")] DSTree dSTree) { if (ModelState.IsValid) { db.Entry(dSTree).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dSTree)); }
public ActionResult Create([Bind(Include = "DSTreeGUID,ModGUID,ID,PID,FactorName,FactorNameCn,Operator,OperatorCn,FactorValue,FactorValueCn,Describe,DescribeCn,Result,ResultCn,CoverCount,ErroCount")] DSTree dSTree) { if (ModelState.IsValid) { dSTree.DSTreeGUID = Guid.NewGuid(); db.DSTree.Add(dSTree); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dSTree)); }
// GET: DSTrees/Details/5 public ActionResult Details(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DSTree dSTree = db.DSTree.Find(id); if (dSTree == null) { return(HttpNotFound()); } return(View(dSTree)); }