Exemplo n.º 1
0
 public OrderController(IOrderService iOrderService, IExpressService iExpressService, IPaymentConfigService iPaymentConfigService
                        , IFightGroupService iFightGroupService)
 {
     _iOrderService         = iOrderService;
     _iExpressService       = iExpressService;
     _iPaymentConfigService = iPaymentConfigService;
     _iFightGroupService    = iFightGroupService;
 }
Exemplo n.º 2
0
 public MyGiftsController(IProductService iProductService, ITypeService iTypeService
                          , IGiftsOrderService iGiftsOrderService, IExpressService iExpressService
                          )
 {
     _iProductService    = iProductService;
     _iTypeService       = iTypeService;
     _iGiftsOrderService = iGiftsOrderService;
     _iExpressService    = iExpressService;
 }
Exemplo n.º 3
0
        public GiftController(IGiftService iGiftService, IGiftsOrderService iGiftsOrderService,
                              IMemberGradeService iMemberGradeService, IExpressService iExpressService, ISlideAdsService iSlideAdsService)
        {
            _iGiftService        = iGiftService;
            _iGiftsOrderService  = iGiftsOrderService;
            _iExpressService     = iExpressService;
            _iMemberGradeService = iMemberGradeService;
            _iSlideAdsService    = iSlideAdsService;


            #region 数据关系映射
            Mapper.CreateMap <GiftInfo, GiftViewModel>();
            Mapper.CreateMap <GiftViewModel, GiftInfo>();
            #endregion
        }
Exemplo n.º 4
0
        public JsonResult Print(string orderIds, string expressName, string startNo, int regionId, string address, string senderName, string senderPhone)
        {
            IExpressService expressService = ServiceHelper.Create <IExpressService>();
            IExpress        express        = expressService.GetExpress(expressName);

            if (!express.CheckExpressCodeIsValid(startNo))
            {
                return(Json(new { success = false, msg = "起始快递单号无效" }));
            }
            ServiceHelper.Create <IShopService>().UpdateShopSenderInfo(base.CurrentSellerManager.ShopId, regionId, address, senderName, senderPhone);
            IEnumerable <int> elements =
                from item in express.Elements
                select item.PrintElementIndex;
            List <PrintModel> printModels = new List <PrintModel>();

            char[]             chrArray = new char[] { ',' };
            IEnumerable <long> nums     =
                from item in orderIds.Split(chrArray)
                select long.Parse(item);

            foreach (long num in nums)
            {
                PrintModel printModel = new PrintModel()
                {
                    Width    = express.Width,
                    Height   = express.Height,
                    FontSize = 11
                };
                PrintModel printModel1 = printModel;
                IDictionary <int, string> printElementIndexAndOrderValue = expressService.GetPrintElementIndexAndOrderValue(base.CurrentSellerManager.ShopId, num, elements);
                printModel1.Elements = printElementIndexAndOrderValue.Select <KeyValuePair <int, string>, PrintModel.PrintElement>((KeyValuePair <int, string> item) =>
                {
                    ExpressPrintElement expressPrintElement = express.Elements.FirstOrDefault((ExpressPrintElement t) => t.PrintElementIndex == item.Key);
                    return(new PrintModel.PrintElement()
                    {
                        X = expressPrintElement.LeftTopPoint.X,
                        Y = expressPrintElement.LeftTopPoint.Y,
                        Height = expressPrintElement.RightBottomPoint.Y - expressPrintElement.LeftTopPoint.Y,
                        Width = expressPrintElement.RightBottomPoint.X - expressPrintElement.LeftTopPoint.X,
                        Value = item.Value
                    });
                });
                printModels.Add(printModel1);
            }
            ServiceHelper.Create <IOrderService>().SetOrderExpressInfo(base.CurrentSellerManager.ShopId, expressName, startNo, nums);
            return(Json(new { success = true, data = printModels }));
        }
Exemplo n.º 5
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="TransController" /> class.
 /// </summary>
 /// <param name="transService">The trans service.</param>
 public TransController(ITransService transService,
                        IEnumService enumService,
                        ISaleRMAService saleRmaService,
                        IRmaService rmaService,
                        IPaymentMethodRepository paymentMethodRepository,
                        ISalesOrderService saleOrderService,
                        IExpressService expressService,
                        IShippingSaleService shippingSaleService
                        )
 {
     _transService            = transService;
     _enumService             = enumService;
     _saleRmaService          = saleRmaService;
     _rmaService              = rmaService;
     _paymentMethodRepository = paymentMethodRepository;
     _saleOrderService        = saleOrderService;
     _expressService          = expressService;
     _shippingSaleService     = shippingSaleService;
 }
 public ExpressDataController(IExpressService iExpressService)
 {
     _iExpressService = iExpressService;
 }
Exemplo n.º 7
0
 public ExpressTemplateController(IExpressService iExpressService)
 {
     _iExpressService = iExpressService;
 }
 public ExpressTemplateController(IExpressService iExpressService, ISiteSettingService iSiteSettingService)
 {
     _iExpressService = iExpressService;
     _iSiteSettingService = iSiteSettingService;
 }