示例#1
0
 public ActionResult AddCategory(CategoryDataObject category)
 {
     using (ServiceProxy <IProductService> proxy = new ServiceProxy <IProductService>())
     {
         proxy.Channel.CreateCategories(new CategoryDataObjectList {
             category
         });
         return(RedirectToSuccess("添加商品分类成功!", "Categories", "Admin"));
     }
 }
示例#2
0
 public ActionResult EditCategory(CategoryDataObject category)
 {
     using (ServiceProxy <IProductService> proxy = new ServiceProxy <IProductService>())
     {
         var categoryList = new CategoryDataObjectList {
             category
         };
         proxy.Channel.UpdateCategories(categoryList);
         return(RedirectToSuccess("更新商品分类成功!", "Categories", "Admin"));
     }
 }