示例#1
0
        public ActionResult CreateEdit(INTCategory Objitem)
        {
            int i = Objitem.Save();

            if (i > 0)
            {
                return(Json(new { data = Objitem }, JsonRequestBehavior.AllowGet));
            }
            return(RedirectToAction("Error"));
        }
示例#2
0
        public ActionResult CreateEdit(int ID)
        {
            INTCategory Objitem = new INTCategory();

            if (ID > 0)
            {
                Objitem = Objitem.GetOne(ID);
            }

            return(View(Objitem));
        }
示例#3
0
        public ActionResult Delete(int ID)
        {
            List <INTCategory> listcategory = INTCategory.GetAll();

            listcategory = listcategory.FindAll(x => x.CatID == ID);

            if (listcategory != null)
            {
                int i = INTCategory.Dell(ID);
            }
            return(Json(new { data = "1" }, JsonRequestBehavior.AllowGet));
        }
示例#4
0
        // GET: Category
        public ActionResult Index()
        {
            List <INTCategory> listcategory = INTCategory.GetAll();

            return(View(listcategory));
        }