Exemple #1
0
        //
        // GET: /PrecipitationTemplate/Delete/5

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

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

        public ActionResult Edit(int id)
        {
            IRepository <Precipitation> repo = new PrecipitationRepository();

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