コード例 #1
0
        public ActionResult DeleteBrewery(FormCollection form)
        {
            if (form["operation"] == "Delete")
            {
                br.Delete(Convert.ToInt32(form["ID"]));
            }

            return(Redirect("/Breweries/ShowTable"));
        }
コード例 #2
0
ファイル: BreweriesController.cs プロジェクト: Boblood/L6
        public ActionResult DeleteBrewery(FormCollection form)
        {
            if (form["operation"] == "Delete")
            {
                //List<Brewery> breweries = (List<Brewery>)Session["Breweries"];

                //int index = breweries.FindIndex(a => a.ID == Convert.ToInt32(form["ID"]));

                //breweries.RemoveAt(index);

                //Session["Breweries"] = breweries;

                _br.Delete(int.Parse(form["id"]));
            }

            return(Redirect("/Breweries/ShowTable"));
        }
コード例 #3
0
 public void Delete(int id)
 {
     _repo.Delete(id);
 }
コード例 #4
0
 //<inheritdoc />
 public void Delete(int id)
 {
     _repository.Delete(id);
 }