// GET: Admin/MenuBanHang
        public ActionResult Index()
        {
            var iplMonAn = new MenuMonAnModel();
            var model    = iplMonAn.ListAll();

            return(View(model));
        }
Ejemplo n.º 2
0
        // PUT: api/NVMenuMonAnApi/5

        public string Put(string maMonAn, string trangThai)
        {
            if (MenuMonAnModel.UpdateTrangThaiMenuMonAn(maMonAn, trangThai))
            {
                return("Sửa thành công!");
            }
            else
            {
                return("Sửa thất bại!");
            }
        }
Ejemplo n.º 3
0
 // DELETE: api/MenuMonAnApi/5
 public string Delete(string maMonAn)
 {
     if (MenuMonAnModel.DeleteMenuMonAn(maMonAn))
     {
         return("Xóa thành công!");
     }
     else
     {
         return("Xóa thất bại!");
     }
 }
Ejemplo n.º 4
0
 public string Put(string trangThaiAll)
 {
     if (MenuMonAnModel.UpdateAllMenuMonAn(trangThaiAll))
     {
         return("Sửa thành công!");
     }
     else
     {
         return("Sửa thất bại!");
     }
 }
Ejemplo n.º 5
0
 // POST: api/MenuMonAnApi
 public string Post(string maMonAn, string trangThai, string giaBan)
 {
     if (MenuMonAnModel.InsertMenuMonAn(maMonAn, trangThai, giaBan))
     {
         return("Thêm thành công!");
     }
     else
     {
         return("Thêm thất bại! Món ăn này đã được thêm vào rồi!");
     }
 }
        // GET: MenuBanHang
        public ActionResult Index()
        {
            var  menu           = new MenuMonAnModel();
            var  model          = menu.ListAll();
            bool isKHDaDangNhap = false;

            if (this.HttpContext.User.Identity.IsAuthenticated)
            {
                if (AccountModel.GetLoaiUser(this.HttpContext.User.Identity.Name) == "kh")
                {
                    isKHDaDangNhap = true;
                }
            }
            ViewBag.IsKhachHangDaDangNhap = isKHDaDangNhap;
            return(View(model));
        }