Exemplo n.º 1
0
 public JsonResult Setting(bool autoAllotOrder)
 {
     try
     {
         ShopApplication.SetAutoAllotOrder(CurrentSellerManager.ShopId, autoAllotOrder);
         ServiceApplication.Create <IOperationLogService>().AddSellerOperationLog(new Entities.LogInfo
         {
             Date        = DateTime.Now,
             Description = string.Format("{0}:订单自动分配到门店", autoAllotOrder ? "开启" : "关闭"),
             IPAddress   = base.Request.HttpContext.Features.Get <IHttpConnectionFeature>()?.RemoteIpAddress.ToString(),
             PageUrl     = "/ShopBranch/Setting",
             UserName    = CurrentSellerManager.UserName,
             ShopId      = CurrentSellerManager.ShopId
         });
         return(Json(new
         {
             success = true
         }));
     }
     catch (Exception e)
     {
         return(Json(new
         {
             success = false,
             msg = e.Message
         }));
     }
 }