예제 #1
0
        public ActionResult AddCategory(CategoryDal obj)
        {
            CategoryDal objcat = new CategoryDal();

            objcat.AddCategory(obj.Categoryname);

            return(Json(obj, JsonRequestBehavior.AllowGet));
        }
        public ActionResult Create(category cat)
        {
            try
            {
                CategoryDal ct = new CategoryDal();
                ct.AddCategory(cat);

                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                return(View());
            }
        }
예제 #3
0
 /// <summary>
 /// 新增Category
 /// </summary>
 /// <param name="Category"></param>
 /// <returns></returns>
 public static async Task <Tuhu.Provisioning.DataAccess.Entity.Discovery.Category> AddCategory(Tuhu.Provisioning.DataAccess.Entity.Discovery.Category Category)
 {
     return(await CategoryDal.AddCategory(Category));
 }