public string page(int nowPage, int pageCount, string productName, string orderId) { try { UserInfoService us = new UserInfoService(); string quanxian_save1 = us.new_quanxian("sel", "订单"); if (quanxian_save1 != null && quanxian_save1.Length > 0 && quanxian_save1 == "是") { } else { return(ResultUtil.error("没有权限!")); } ois = new OrderInfoService(); return(ResultUtil.success(ois.page(nowPage, pageCount, productName, orderId), "查询成功")); } catch (ErrorUtil err) { return(ResultUtil.fail(401, err.Message)); } catch { return(ResultUtil.error("查询失败")); } }
public string list() { try { UserInfoService us = new UserInfoService(); string quanxian_save1 = us.new_quanxian("sel", "订单"); if (quanxian_save1 != null && quanxian_save1.Length > 0 && quanxian_save1 == "是") { } else { return(ResultUtil.error("没有权限!")); } ois = new OrderInfoService(); return(ResultUtil.success(ois.list(), "查询成功")); } catch (ErrorUtil err) { return(ResultUtil.fail(401, err.Message)); } catch { return(ResultUtil.error("查询失败")); } }
public JdDataServiceWrapper(string constr) { tradesService = new TradesService(constr); goodInfoService = new GoodInfoService(tradesService); recordService = new DataSyncRecordService(tradesService); orderInfoService = new OrderInfoService(tradesService); }
public string checkOrder(string orderId) { try { UserInfoService us = new UserInfoService(); string quanxian_save1 = us.new_quanxian("sel", "订单"); if (quanxian_save1 != null && quanxian_save1.Length > 0 && quanxian_save1 == "是") { } else { return(ResultUtil.error("没有权限!")); } ois = new OrderInfoService(); if (ois.checkOrderId(orderId)) { return(ResultUtil.fail(1, "")); } else { return(ResultUtil.fail(-1, "")); } } catch (ErrorUtil err) { return(ResultUtil.fail(401, err.Message)); } catch { return(ResultUtil.error("查询失败")); } }
public string update(order_info orderInfo) { try { UserInfoService us = new UserInfoService(); string quanxian_save1 = us.new_quanxian("upd", "订单"); if (quanxian_save1 != null && quanxian_save1.Length > 0 && quanxian_save1 == "是") { } else { return(ResultUtil.error("没有权限!")); } ois = new OrderInfoService(); if (ois.update(orderInfo)) { return(ResultUtil.success("修改成功")); } else { return(ResultUtil.error("修改失败")); } } catch (ErrorUtil err) { return(ResultUtil.fail(401, err.Message)); } catch { return(ResultUtil.error("修改失败")); } }
public OrderDetailInfoResponse getOrderById(OrderDetailInfoRequest orderFilter, string token) { OrderInfoService orderDetail = new OrderInfoService(AppRuntime.MarketWebClient, "api/v1/orders/details"); orderDetail.SetToken = token; var result = orderDetail.GetOrderDetail(orderFilter).Result; return(result); }
/// <summary> /// Этот класс статический, поэтому нужно загрузить сервисы по вызову. /// </summary> public static void InitServices() { var mapper = AutoMapperConfigurationManager.CreateMapper(); var _supplierInfoService = new SupplierInfoService(_logger, mapper); var _orderInfoService = new OrderInfoService(_logger, mapper, _supplierInfoService); var _courierShiftService = new CourierShiftService(_logger, mapper); _courierShiftHistoryService = new CourierShiftHistoryService(_logger, mapper, _supplierInfoService, _orderInfoService, _courierShiftService); _incomingOrderService = new IncomingOrderService(_logger, mapper, _supplierInfoService, _orderInfoService, _courierShiftHistoryService); }
public ServicesManager( DataManager dataManager ) { _dataManager = dataManager; _brandService = new BrandService(_dataManager); _tagService = new TagService(_dataManager); _clothesService = new ClothesService(_dataManager); _basketService = new BasketService(_dataManager); _imageService = new ImageService(_dataManager); _orderInfoService = new OrderInfoService(_dataManager); }
public ServicesManager( DataManager dataManager ) { _dataManager = dataManager; _categoryService = new CategoryService(_dataManager); _tagService = new TagService(_dataManager); _dishesService = new DishesService(_dataManager); _basketService = new BasketService(_dataManager); _imageService = new ImageService(_dataManager); _orderInfoService = new OrderInfoService(_dataManager); }
public CourierShiftHistoryService( ILogger logger, IMapper mapper, SupplierInfoService supplierInfoService, OrderInfoService orderInfoSrv, CourierShiftService courierWorkShiftsScheduleService) { _dbContext = new AppDbContext(); _logger = logger; _mapper = mapper; _supplierInfoService = supplierInfoService; _orderInfoSrv = orderInfoSrv; _courierWorkShiftsScheduleService = courierWorkShiftsScheduleService; }
public string save(order_info orderInfo, List <BomInfoItem> bomList) { using (TransactionScope tran = new TransactionScope()) { try { UserInfoService us = new UserInfoService(); string quanxian_save1 = us.new_quanxian("add", "订单"); if (quanxian_save1 != null && quanxian_save1.Length > 0 && quanxian_save1 == "是") { } else { return(ResultUtil.error("没有权限!")); } ois = new OrderInfoService(); if (bomList.Count == 0 || bomList == null) { return(ResultUtil.error("保存失败")); } if (ois.save(orderInfo, bomList)) { tran.Complete(); return(ResultUtil.success("保存成功")); } else { return(ResultUtil.error("保存失败")); } } catch (ErrorUtil err) { return(ResultUtil.fail(401, err.Message)); } catch { return(ResultUtil.error("保存失败")); } } }
public string delete(int id) { using (TransactionScope tran = new TransactionScope()) { try { UserInfoService us = new UserInfoService(); string quanxian_save1 = us.new_quanxian("del", "订单"); if (quanxian_save1 != null && quanxian_save1.Length > 0 && quanxian_save1 == "是") { } else { return(ResultUtil.error("没有权限!")); } ois = new OrderInfoService(); if (ois.delete(id)) { tran.Complete(); return(ResultUtil.success("删除成功")); } else { return(ResultUtil.error("删除失败")); } } catch (ErrorUtil err) { return(ResultUtil.fail(401, err.Message)); } catch { return(ResultUtil.error("删除失败")); } } }
public OrderInfoController(IConfiguration configuration) { var connectionString = configuration.GetConnectionString("ConnectionString"); this.OrderInfoService = new OrderInfoService(new OrderInfoRepository(connectionString), new OrdersRepository(connectionString), new CartRepository(connectionString)); }