public ActionResult AddMenu(FormCollection form)
        {
            string cookie = Request.Cookies["company"].Value;
            Menu   menu   = new Menu()
            {
                CompanyID  = _companyDal.GetCompanyByCookie(cookie).ID,
                MenuName   = form["name"],
                MenuDetail = form["detail"],
                Price      = Convert.ToDecimal(form["price"])
            };

            _menuDal.Add(menu);
            return(RedirectToAction("Menus"));
        }
Esempio n. 2
0
 public void Add(Menu menu)
 {
     _menuDal.Add(menu);
 }
Esempio n. 3
0
 public void Add(Entities.Menu entity)
 {
     _menuDal.Add(entity);
 }
Esempio n. 4
0
 public Menu Add(Menu model)
 {
     return(_mapper.Map <Menu>(_menuDal.Add(model)));
 }