Beispiel #1
0
        //
        // GET: /ConditionTemplate/Delete/5

        public ActionResult Delete(int id)
        {
            IRepository <Models.Condition> repo = new ConditionRepository();

            repo.Delete(repo.GetById(id));
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Delete(int id, FormCollection collection)
 {
     try
     {
         IRepository <Models.Condition> repo = new ConditionRepository();
         repo.Delete(repo.GetById(id));
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Beispiel #3
0
        //
        // GET: /ConditionTemplate/Edit/5

        public ActionResult Edit(int id)
        {
            IRepository <Condition> repo = new ConditionRepository();

            return(View(repo.GetById(id)));
        }