Exemplo n.º 1
0
        public ActionResult Categories()
        {
            if (Session["ID"] == null)
            {
                return(RedirectToAction("Index"));
            }

            List <CATEGORY> categories = categoryDA.GetAll(null);

            return(View(categories));
        }
Exemplo n.º 2
0
        public ActionResult Create()
        {
            ViewBag.CategoryList = new SelectList(CategoryDataAccess.GetAll(), "CategoryCode", "CategoryName");

            ViewBag.ItemList = new SelectList(ItemDataAccess.GetByCategory(""), "ItemCode", "ItemName");

            return(View());
        }
Exemplo n.º 3
0
        public ActionResult Edit(int id)
        {
            VarianViewModel model = VarianDataAccess.GetById(id);

            ViewBag.CategoryList = new SelectList(CategoryDataAccess.GetAll(), "CategoryCode", "CategoryName");

            ViewBag.ItemList = new SelectList(ItemDataAccess.GetByCategory(model.CategoryCode), "ItemCode", "ItemName");

            return(View(model));
        }
Exemplo n.º 4
0
        public ActionResult _Menu()
        {
            List <CATEGORY> categories = categoryDA.GetAll(true);

            return(PartialView(categories));
        }
Exemplo n.º 5
0
 public ActionResult Edit(int id)
 {
     ViewBag.CategoryList = new SelectList(CategoryDataAccess.GetAll(), "CategoryCode", "CategoryName");
     return(View(ItemDataAccess.GetById(id)));
 }
Exemplo n.º 6
0
 public ActionResult List()
 {
     return(View(CategoryDataAccess.GetAll()));
 }