Exemplo n.º 1
1
 public OrdersTests()
 {
     _orders = new Orders();
 }
Exemplo n.º 2
0
 public Warehouse(string folder)
 {
     Directory.CreateDirectory(folder);
     Customers = new CustomerCatalogue(folder);
     Products  = new ProductCatalogue(folder);
     Orders    = new OrderCatalogue(folder);
 }
 /// <summary>
 /// Initializes a new instance of the XamarinMVVMSampleWebAPI class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public XamarinMVVMSampleWebAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._customers = new Customers(this);
     this._employees = new Employees(this);
     this._orders    = new Orders(this);
 }
 /// <summary>
 /// Initializes a new instance of the XamarinMVVMSampleWebAPI class.
 /// </summary>
 public XamarinMVVMSampleWebAPI()
     : base()
 {
     this._customers = new Customers(this);
     this._employees = new Employees(this);
     this._orders    = new Orders(this);
 }
Exemplo n.º 5
0
        public override void OnInitialize()
        {
            base.OnInitialize();
            try
            {
                _orderRoutine = OrderRoutine.OrderRoutine.GetOrderRoutine();
                _orders       = _orderRoutine.GetOrders();

                _billings = GlobalDataObjects.GetGlobalDataObject("Cx.Client.Taxi.Billings.Data.Billings") as IBillings;
                if (_billings == null)
                {
                    GlobalLogManager.WriteString("Error: Ошибка в плагине ClientsBountyManager. Не удалось загрузить данные по счетам");
                }

                _orders.StatePropertyChanged     += _orders_StatePropertyChanged;
                _billings.BalancePropertyChanged += _billings_BalancePropertyChanged;
            }
            catch (Exception e)
            {
                GlobalLogManager.WriteString("Error: Ошибка в плагине ClientsBountyManager. {0}", e);
            }

            LoadParams();

            _watcher = new FileSystemWatcher(GlobalUtils.AppDirectory, "ClientsBountyParams.xml");
            _watcher.NotifyFilter        = NotifyFilters.LastWrite;
            _watcher.Changed            += watcher_Changed;
            _watcher.EnableRaisingEvents = true;
        }
Exemplo n.º 6
0
    public Cart()
    {
        Response    = System.Web.HttpContext.Current.Response;
        Request     = System.Web.HttpContext.Current.Request;
        Server      = System.Web.HttpContext.Current.Server;
        Session     = System.Web.HttpContext.Current.Session;
        Application = System.Web.HttpContext.Current.Application;

        tools         = ToolsFactory.CreateTools();
        encrypt       = EncryptFactory.CreateEncrypt();
        MyOrders      = OrdersFactory.CreateOrders();
        MyCart        = OrdersGoodsTmpFactory.CreateOrdersGoodsTmp();
        MyProduct     = ProductFactory.CreateProduct();
        MyMem         = MemberFactory.CreateMember();
        Mypackage     = PackageFactory.CreatePackage();
        MyAddr        = MemberAddressFactory.CreateMemberAddress();
        MyDelivery    = DeliveryWayFactory.CreateDeliveryWay();
        MyPayway      = PayWayFactory.CreatePayWay();
        Mydelierytime = DeliveryTimeFactory.CreateDeliveryTime();
        MyInvioce     = OrdersInvoiceFactory.CreateOrdersInvoice();
        MyFavorFee    = PromotionFavorFeeFactory.CreatePromotionFavorFee();
        MyCoupon      = PromotionFavorCouponFactory.CreatePromotionFavorCoupon();
        MyPolicy      = PromotionFavorPolicyFactory.CreatePromotionFavorPolicy();
        MyGift        = PromotionFavorGiftFactory.CreatePromotionFavorGift();
        MyCommission  = SupplierCommissionCategoryFactory.CreateSupplierCommissionCategory();
        MySupplier    = SupplierFactory.CreateSupplier();
        MyFavor       = PromotionFavorFactory.CreatePromotionFavor();
        MyLimit       = PromotionLimitFactory.CreatePromotionLimit();
        MyMemberFavor = MemberFavoritesFactory.CreateMemberFavorites();
        pageurl       = new PageURL(int.Parse(Application["Static_IsEnable"].ToString()));
    }
Exemplo n.º 7
0
    public Orders()
    {
        Response    = System.Web.HttpContext.Current.Response;
        Request     = System.Web.HttpContext.Current.Request;
        Server      = System.Web.HttpContext.Current.Server;
        Session     = System.Web.HttpContext.Current.Session;
        Application = System.Web.HttpContext.Current.Application;

        tools           = ToolsFactory.CreateTools();
        encrypt         = EncryptFactory.CreateEncrypt();
        MyOrders        = OrdersFactory.CreateOrders();
        Mylog           = OrdersLogFactory.CreateOrdersLog();
        MyDelivery      = DeliveryWayFactory.CreateDeliveryWay();
        MyPayway        = PayWayFactory.CreatePayWay();
        MyProduct       = ProductFactory.CreateProduct();
        Mypackage       = PackageFactory.CreatePackage();
        Myorderdelivery = OrdersDeliveryFactory.CreateOrdersDelivery();
        MyFavorFee      = PromotionFavorFeeFactory.CreatePromotionFavorFee();
        MyCoupon        = PromotionFavorCouponFactory.CreatePromotionFavorCoupon();
        MyBack          = OrdersBackApplyFactory.CreateOrdersBackApply();
        MyPolicy        = PromotionFavorPolicyFactory.CreatePromotionFavorPolicy();
        MySupplier      = SupplierFactory.CreateSupplier();
        Mydelierytime   = DeliveryTimeFactory.CreateDeliveryTime();
        MyMember        = MemberFactory.CreateMember();
        MyConsumption   = MemberConsumptionFactory.CreateMemberConsumption();
        pageurl         = new PageURL(int.Parse(Application["Static_IsEnable"].ToString()));
        MyAccountLog    = MemberAccountLogFactory.CreateMemberAccountLog();
        MyFavor         = PromotionFavorFactory.CreatePromotionFavor();
        MyCouponRule    = PromotionCouponRuleFactory.CreatePromotionFavorCoupon();
        MyInvoice       = OrdersInvoiceFactory.CreateOrdersInvoice();
    }
Exemplo n.º 8
0
    DeliveryRoom()
    {
        Text = "Delivery Room";
        try
        {
            RemotingConfiguration.Configure("DeliveryRoom.exe.config", false);
            inter = new EventIntermediate();
            inter.ReadyOrder += OnReadyOrder;
            inter.DeliveringOrder += OnDeliveringOrder;
            inter.FinalizingOrder += OnFinalizingOrder;
            ordersList = (IOrders)Activator.GetObject(typeof(IOrders), "tcp://localhost:9000/Server/OrdersServer");
            ordersList.ReadyOrder += inter.FireReadyOrder;
            ordersList.DeliveringOrder += inter.FireDeliveringOrder;
            ordersList.FinalizingOrder += inter.FireFinalizingOrder;
            TeamID = (ordersList.GetDeliveryTeams().Count + 1).ToString();
            ordersList.AddDeliveryTeam(TeamID);
            InitializeComponent();
            checkIfExistsSavedOrders();

        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
            Close();
        }
    }
Exemplo n.º 9
0
 /// <param name='operations'>
 /// Reference to the Forms.Http.IOrders.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 public static Order DeleteOrder(this IOrders operations, int id)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IOrders)s).DeleteOrderAsync(id);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the XamarinMVVMSampleWebAPI class.
 /// </summary>
 public XamarinMVVMSampleWebAPI()
     : base()
 {
     this._customers = new Customers(this);
     this._employees = new Employees(this);
     this._orders    = new Orders(this);
     this._baseUri   = new Uri("https://xamarinmvvmsamplewebapi.azurewebsites.net");
 }
 /// <summary>
 /// Initializes a new instance of the XamarinMVVMSampleWebAPI class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public XamarinMVVMSampleWebAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._customers = new Customers(this);
     this._employees = new Employees(this);
     this._orders    = new Orders(this);
     this._baseUri   = new Uri("https://xamarinmvvmsamplewebapi.azurewebsites.net");
 }
 public Warehouse(string folder)
 {
     Directory.CreateDirectory(folder);
     Customers = new CustomerCatalogue(folder);
     Products  = new ProductCatalogue(folder);
     Orders    = new OrderCatalogue(folder);
     UpdateOrderReferences(); // Uppdatera referenser för kunder och och produkter för ordrar.
 }
Exemplo n.º 13
0
 /// <param name='operations'>
 /// Reference to the Forms.Http.IOrders.
 /// </param>
 public static IList <Order> GetOrders(this IOrders operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IOrders)s).GetOrdersAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemplo n.º 14
0
 public TestOCAPIClients(SFCCEnvironmentFixture fixture)
 {
     _sitesClient             = fixture.ServiceProvider.GetService <ISites>();
     _jobsClient              = fixture.ServiceProvider.GetService <IJobs>();
     _globalPreferencesClient = fixture.ServiceProvider.GetService <IGlobalPreferences>();
     _orderSearchClient       = fixture.ServiceProvider.GetService <IOrderSearch>();
     _ordersClient            = fixture.ServiceProvider.GetService <IOrders>();
     _jobSearchClient         = fixture.ServiceProvider.GetService <IJobExecutionSearch>();
     _codeVersionsClient      = fixture.ServiceProvider.GetService <ICodeVersions>();
 }
Exemplo n.º 15
0
 public OrdersManager(IOrders orders, ITrades trades, ISecurities securities)
 {
     if (orders == null)
         throw new ArgumentNullException("orders");
     if (trades == null)
         throw new ArgumentNullException("trades");
     _orders = orders;
     _orders.Updated += OrdersUpdated;
     _trades = trades;
     _trades.Updated += TradesUpdated;
 }
Exemplo n.º 16
0
        public void QueryExcute(IOrders order) => Connect.GetInstance().Request.RequestTrData(new Task(() =>
        {
            if (LoadFromResFile(Secrecy.GetResFileName(GetType().Name)))
            {
                foreach (var param in GetInBlocks(Secrecy.GetData(this, order)))
                {
                    SetFieldData(param.Block, param.Field, param.Occurs, param.Data);
                }

                SendErrorMessage(GetType().Name, Request(false));
            }
        }));
Exemplo n.º 17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
       {                                       // first load in a session
       GridView1.Visible = false;
       Panel1.Visible = false;
       Panel2.Visible = false;
       Panel4.Visible = false;
       }
     string address = ConfigurationManager.AppSettings["RemoteAddress"];
     orderObj = (IOrders) Activator.GetObject(typeof(IOrders), address);
 }
Exemplo n.º 18
0
    public OrdersDelivery()
    {
        //初始化ASP.NET内置对象
        Response    = System.Web.HttpContext.Current.Response;
        Request     = System.Web.HttpContext.Current.Request;
        Server      = System.Web.HttpContext.Current.Server;
        Session     = System.Web.HttpContext.Current.Session;
        Application = System.Web.HttpContext.Current.Application;

        tools   = ToolsFactory.CreateTools();
        MyBLL   = OrdersDeliveryFactory.CreateOrdersDelivery();
        Myorder = OrdersFactory.CreateOrders();
    }
Exemplo n.º 19
0
 public PaymentController(
     IPaymentServices paymentServices,
     IOrders orders,
     DefaultContext dbContext,
     ICurrentUserProvider currentUserProvider,
     AppConfiguration configuration
     )
 {
     this.orders              = orders;
     this.dbContext           = dbContext;
     this.currentUserProvider = currentUserProvider;
     this.configuration       = configuration;
     this.paymentServices     = paymentServices;
 }
Exemplo n.º 20
0
 public AdminController(IHostingEnvironment env, IDimensions dimensions, IProductModels productModels, IMaterials materials, IUsers users, IUserProfiles userProfiles, IProductOrders productOrders, IOrders orders, IProducts products, IProducers producers, ITypeOfProducts type, ISubCategories subCategories)
 {
     _producers     = producers;
     _products      = products;
     _type          = type;
     _subCategories = subCategories;
     _orders        = orders;
     _productOrders = productOrders;
     _users         = users;
     _userProfiles  = userProfiles;
     _dimensions    = dimensions;
     _productModels = productModels;
     _materials     = materials;
     _env           = env;
 }
Exemplo n.º 21
0
    public EcommerceUnitOfWork(EcommerceDDDContext dbContext,
                               ICustomers customers,
                               IOrders orders,
                               IStoredEvents storedEvents,
                               IProducts products,
                               IPayments payments,
                               IQuotes quotes,
                               IEventSerializer eventSerializer) : base(dbContext)
    {
        Customers    = customers ?? throw new ArgumentNullException(nameof(customers));
        Orders       = orders ?? throw new ArgumentNullException(nameof(orders));
        StoredEvents = storedEvents ?? throw new ArgumentNullException(nameof(storedEvents));
        Products     = products ?? throw new ArgumentNullException(nameof(products));
        Quotes       = quotes ?? throw new ArgumentNullException(nameof(quotes));
        Payments     = payments ?? throw new ArgumentNullException(nameof(payments));

        _eventSerializer = eventSerializer ?? throw new ArgumentNullException(nameof(eventSerializer));
    }
Exemplo n.º 22
0
    public Contract()
    {
        iaddr              = AddrFactory.CreateAddr();
        Response           = System.Web.HttpContext.Current.Response;
        Request            = System.Web.HttpContext.Current.Request;
        Server             = System.Web.HttpContext.Current.Server;
        Session            = System.Web.HttpContext.Current.Session;
        Application        = System.Web.HttpContext.Current.Application;
        tools              = ToolsFactory.CreateTools();
        addr               = new Addr();
        MyContract         = ContractFactory.CreateContract();
        MyContractTemplate = ContractTemplateFactory.CreateContractTemplate();
        MySupplier         = SupplierFactory.CreateSupplier();
        credit             = new Credit();
        MyOrders           = OrdersFactory.CreateOrders();


        //MyContractSigned = ContractSignedFactory.CreateContractSigned();
    }
Exemplo n.º 23
0
 public BagController(IUsers users, IUserProfiles userProfiles, IReviews reviews, IDislikes dislikes, ILikes likes, IDeliveries deliveries, IProductOrders productOrders, ITypeOfProducts type, ISubCategories subCategories, IOrders orders, IDimensions dimensions, IProducts products, IProducers producers, IProductModels productModels, IProductImages productImages, IMaterials materials)
 {
     _products      = products;
     _producers     = producers;
     _productModels = productModels;
     _productImages = productImages;
     _materials     = materials;
     _dimensions    = dimensions;
     _orders        = orders;
     _type          = type;
     _subCategories = subCategories;
     _productOrders = productOrders;
     _deliveries    = deliveries;
     _dislikes      = dislikes;
     _likes         = likes;
     _reviews       = reviews;
     _userProfiles  = userProfiles;
     _users         = users;
 }
Exemplo n.º 24
0
        /// <summary>
        /// The default constructor of the orders controller
        /// getting the DI connection configuration, initializing interfaces
        /// and connecting to ERP.
        /// </summary>
        public OrdersController()
        {
            // Get connection details from configuration file.
            var confPath = Path.Combine(
                HttpRuntime.AppDomainAppPath,
                "Configuration");

            var connectionPath = File.ReadAllText(
                Path.Combine(
                    confPath,
                    "AlalaDocuments.conf"));

            var connection   = JsonConvert.DeserializeObject <DiConnectionModel>(connectionPath);
            var passwordPath = Path.Combine(
                confPath,
                "AlalaDocuments.dat");

            _connector = new DiConnectionMockup(connection, passwordPath); // TODO: Turn this to the actual controller for integration testing.

            _connector.Connect();

            _orders = new OrdersMockup(_connector); // TODO: Turn this to the actual controller for integration testing.
        }
Exemplo n.º 25
0
    PrepRoom()
    {
        Text = "Preparation Room";
        try
        {
            RemotingConfiguration.Configure("Client.exe.config", false);
            inter = new EventIntermediate();
            inter.AddingOrder += OnAddingOrder;
            inter.PreparingOrder += OnPreparingOrder;
            inter.ReadyOrder += OnReadyOrderPrep;
            ordersList = (IOrders)Activator.GetObject(typeof(IOrders), "tcp://localhost:9000/Server/OrdersServer");
            ordersList.AddingOrder += inter.FireAddingOrder;
            ordersList.PreparingOrder += inter.FirePreparingOrder;
            ordersList.ReadyOrder += inter.FireReadyOrder;
            InitializeComponent();
            checkIfExistsSavedOrders();

        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
            Close();
        }
    }
Exemplo n.º 26
0
 public OrderController(IOrders orders, ShopCart shopCart)
 {
     this.orders   = orders;
     this.shopCart = shopCart;
 }
Exemplo n.º 27
0
 public Application(IOrders orders)
 {
     if (orders == null) throw new ArgumentNullException("orders");
     _orders = orders;
 }
Exemplo n.º 28
0
 public OrdersController(IOrders orders)
 {
     _orders = orders;
 }
Exemplo n.º 29
0
 public SyncController()
 {
     _auth     = new AuthFake();
     _products = new ProductsFake();
     _orders   = new OrdersFake();
 }
Exemplo n.º 30
0
 public OrdersController(IOrders iorders)
 {
     this.iorders = iorders;
 }
Exemplo n.º 31
0
 public ShopModel(IAbstractShopFactory abstractShopFactory)
 {
     users    = abstractShopFactory.CreateUsers();
     products = abstractShopFactory.CreateProducts();
     orders   = abstractShopFactory.CreateOrders();
 }
Exemplo n.º 32
0
 public OrderController(IOrders repo)
 {
     _repo = repo;
 }
Exemplo n.º 33
0
 public OrderController(IOrders orders, IUserSettings userSettings, XatarisContext xatarisContext) : base(xatarisContext)
 {
     _order        = orders;
     _userSettings = userSettings;
 }
Exemplo n.º 34
0
        /// <param name='operations'>
        /// Reference to the Forms.Http.IOrders.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <IList <Order> > GetOrdersAsync(this IOrders operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <Forms.Http.Models.Order> > result = await operations.GetOrdersWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Exemplo n.º 35
0
        /// <param name='operations'>
        /// Reference to the Forms.Http.IOrders.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <Order> GetOrderAsync(this IOrders operations, int id, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <Forms.Http.Models.Order> result = await operations.GetOrderWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Exemplo n.º 36
0
        /// <param name='operations'>
        /// Reference to the Forms.Http.IOrders.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='order'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> PutOrderAsync(this IOrders operations, int id, Order order, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.PutOrderWithOperationResponseAsync(id, order, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }