Пример #1
0
        public JsonResult BatchDeleteCategory(string Ids)
        {
            int id;

            foreach (var idStr in Ids.Split('|'))
            {
                if (string.IsNullOrWhiteSpace(idStr))
                {
                    continue;
                }
                if (int.TryParse(idStr, out id))
                {
                    CategoryApplication.DeleteCategory(id);
                    // ServiceApplication.Create<IOperationLogService>().AddPlatformOperationLog(
                    //new LogInfo
                    //{
                    //    Date = DateTime.Now,
                    //    Description = "删除平台分类,Id=" + id,
                    //    IPAddress = Request.UserHostAddress,
                    //    PageUrl = "/Category/BatchDeleteCategory/" + id,
                    //    UserName = CurrentManager.UserName,
                    //    ShopId = 0

                    //});
                }
            }
            return(Json(new Result {
                success = true
            }, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public JsonResult BatchDeleteCategory(string Ids)
        {
            int id;

            foreach (var idStr in Ids.Split('|'))
            {
                if (string.IsNullOrWhiteSpace(idStr))
                {
                    continue;
                }
                if (int.TryParse(idStr, out id))
                {
                    CategoryApplication.DeleteCategory(id);
                    // ServiceApplication.Create<IOperationLogService>().AddPlatformOperationLog(
                    //new LogInfo
                    //{
                    //    Date = DateTime.Now,
                    //    Description = "删除平台分类,Id=" + id,
                    //    IPAddress =  base.Request.HttpContext.Features.Get<IHttpConnectionFeature>()?.RemoteIpAddress.ToString(),
                    //    PageUrl = "/Category/BatchDeleteCategory/" + id,
                    //    UserName = CurrentManager.UserName,
                    //    ShopId = 0

                    //});
                }
            }
            return(Json(new Result {
                success = true
            }));
        }
Пример #3
0
 public JsonResult DeleteCategoryById(long id)
 {
     CategoryApplication.DeleteCategory(id);             //用AOP来做
     //ServiceHelper.Create<IOperationLogService>().AddPlatformOperationLog(
     //       new LogInfo
     //       {
     //           Date = DateTime.Now,
     //           Description = "删除平台分类,Id=" + id,
     //           IPAddress = Request.UserHostAddress,
     //           PageUrl = "/Category/DeleteCategoryById/" + id,
     //           UserName = CurrentManager.UserName,
     //           ShopId = 0
     //       });
     return(Json(new { Successful = true }, JsonRequestBehavior.AllowGet));
 }
Пример #4
0
 public JsonResult BatchDeleteCategory(string Ids)
 {
     foreach (string str in Ids.Split(new char[] { '|' }))
     {
         int num;
         if (!string.IsNullOrWhiteSpace(str) && int.TryParse(str, out num))
         {
             CategoryApplication.DeleteCategory((long)num);
         }
     }
     BaseController.Result data = new BaseController.Result
     {
         success = true
     };
     return(base.Json(data, JsonRequestBehavior.AllowGet));
 }
Пример #5
0
 public JsonResult DeleteCategoryById(long id)
 {
     CategoryApplication.DeleteCategory(id);                 //用AOP来做
     CashDepositsApplication.DeleteCategoryCashDeposits(id); //--bo.shu  2017-8-31  删除类型的同时 删除对应类型的保证金
     //ServiceApplication.Create<IOperationLogService>().AddPlatformOperationLog(
     //       new LogInfo
     //       {
     //           Date = DateTime.Now,
     //           Description = "删除平台分类,Id=" + id,
     //           IPAddress = Request.UserHostAddress,
     //           PageUrl = "/Category/DeleteCategoryById/" + id,
     //           UserName = CurrentManager.UserName,
     //           ShopId = 0
     //       });
     return(Json(new Result {
         success = true
     }, JsonRequestBehavior.AllowGet));
 }
Пример #6
0
 public JsonResult DeleteCategoryById(long id)
 {
     CategoryApplication.DeleteCategory(id);                 //用AOP来做
     CashDepositsApplication.DeleteCategoryCashDeposits(id); //--bo.shu  2017-8-31  删除类型的同时 删除对应类型的保证金
     //ServiceApplication.Create<IOperationLogService>().AddPlatformOperationLog(
     //       new LogInfo
     //       {
     //           Date = DateTime.Now,
     //           Description = "删除平台分类,Id=" + id,
     //           IPAddress =  base.Request.HttpContext.Features.Get<IHttpConnectionFeature>()?.RemoteIpAddress.ToString(),
     //           PageUrl = "/Category/DeleteCategoryById/" + id,
     //           UserName = CurrentManager.UserName,
     //           ShopId = 0
     //       });
     return(Json(new Result {
         success = true
     }));
 }