Exemplo n.º 1
0
 public OrderController(OrderManagerClient client,
                        IRequestClient <FindArchiveRecordRequest, FindArchiveRecordResponse> findArchiveRecordClient,
                        IParameterHelper parameterHelper, IMailHelper mailHelper)
 {
     orderManagerClient           = client;
     this.findArchiveRecordClient = findArchiveRecordClient;
     this.parameterHelper         = parameterHelper;
     this.mailHelper = mailHelper;
 }
Exemplo n.º 2
0
 public OrderController(OrderManagerClient client,
                        IEntityProvider entityProvider,
                        IKontrollstellenInformer kontrollstellenInformer,
                        IElasticService elasticService,
                        DigitalisierungsbeschraenkungSettings digitalisierungsbeschraenkungSettings,
                        IUserDataAccess userDataAccess)
 {
     this.client                  = client;
     this.entityProvider          = entityProvider;
     this.kontrollstellenInformer = kontrollstellenInformer;
     this.elasticService          = elasticService;
     this.digitalisierungsbeschraenkungSettings = digitalisierungsbeschraenkungSettings;
     this.userDataAccess = userDataAccess;
 }
Exemplo n.º 3
0
        public userHome(User.User loggedUser)
        {
            this.loggedUser     = loggedUser;
            this.productManager = new ProductManagerClient();
            this.orderManager   = new OrderManagerClient();
            this.userManager    = new UserManagerClient();

            InitializeComponent();
            this.Text = "Ciao " + this.loggedUser.name;

            MaterialSkinManager materialUIManager = MaterialSkinManager.Instance;

            materialUIManager.AddFormToManage(this);
            materialUIManager.Theme = MaterialSkinManager.Themes.LIGHT;

            materialUIManager.ColorScheme = new ColorScheme(
                Primary.Blue400, Primary.Blue500,
                Primary.Blue500, Accent.Orange200,
                TextShade.WHITE
                );

            productListView.Clear();
            productListView.View = View.Details;
            productListView.Columns.Add("ID", 150, HorizontalAlignment.Left);
            productListView.Columns.Add("Nome", 250, HorizontalAlignment.Left);
            productListView.Columns.Add("Barcode", 200, HorizontalAlignment.Left);
            productListView.Columns.Add("prezzo", 150, HorizontalAlignment.Left);


            cartListView.View = View.Details;
            cartListView.Columns.Add("ID", 150, HorizontalAlignment.Left);
            cartListView.Columns.Add("Prodotto", 300, HorizontalAlignment.Left);
            cartListView.Columns.Add("prezzo", 200, HorizontalAlignment.Left);
            cartListView.Columns.Add("Quantita", 200, HorizontalAlignment.Left);

            ordersListView.View = View.Details;
            ordersListView.Columns.Add("ID", 150, HorizontalAlignment.Left);
            ordersListView.Columns.Add("Data Ordine", 300, HorizontalAlignment.Center);
            ordersListView.Columns.Add("Totale", 200, HorizontalAlignment.Left);

            this.loadProducts();
            this.loadOrders();
            this.loadProfile();
        }
        public async Task Adding_manual_order_with_two_date_period_is_not_changed()
        {
            // Arrange
            var orderManager = new OrderManagerClient(Bus);
            var controller   = new OrderController(orderManager, null, null, null, null, null);

            // Act
            var result = await controller.AddToBasket(new FormularBestellungParams
            {
                Title  = "Test",
                Period = "24.12.1950-14.01.1960"
            });

            var contentResult = result as NegotiatedContentResult <OrderItemDto>;

            // Assert
            contentResult.Should().NotBeNull();
            contentResult.Content.Period.Should().Be("24.12.1950-14.01.1960");
        }
        public async Task Adding_manual_order_with_single_year_period_results_in_JJJJ_JJJJ()
        {
            // Arrange
            var orderManager = new OrderManagerClient(Bus);
            var controller   = new OrderController(orderManager, null, null, null, null, null);

            // Act
            var result = await controller.AddToBasket(new FormularBestellungParams
            {
                Title  = "Test",
                Period = "1950"
            });

            var contentResult = result as NegotiatedContentResult <OrderItemDto>;

            // Assert
            contentResult.Should().NotBeNull();
            contentResult.Content.Period.Should().Be("1950-1950");
        }
Exemplo n.º 6
0
 public DigitizationHelper(IBus bus, OrderManagerClient orderManagerClient)
 {
     this.bus = bus;
     this.orderManagerClient = orderManagerClient;
 }
Exemplo n.º 7
0
        public adminPanel(User.User loggedUser)
        {
            this.loggedUser = loggedUser;
            //manager refs
            this.productManager  = new ProductManagerClient();
            this.orderManager    = new OrderManagerClient();
            this.userManager     = new UserManagerClient();
            this.BrandManager    = new BrandManagerClient();
            this.CategoryManager = new CategoryManagerClient();
            InitializeComponent();

            //materialskin stuff
            MaterialSkinManager materialUIManager = MaterialSkinManager.Instance;

            materialUIManager.AddFormToManage(this);
            materialUIManager.Theme = MaterialSkinManager.Themes.LIGHT;

            materialUIManager.ColorScheme = new ColorScheme(
                Primary.Blue400, Primary.Blue500,
                Primary.Blue500, Accent.Orange200,
                TextShade.WHITE
                );

            //product list
            productListView.Clear();
            productListView.View = View.Details;
            productListView.Columns.Add("ID", 150, HorizontalAlignment.Left);
            productListView.Columns.Add("Nome", 250, HorizontalAlignment.Left);
            productListView.Columns.Add("Barcode", 200, HorizontalAlignment.Left);
            productListView.Columns.Add("prezzo", 150, HorizontalAlignment.Left);
            productListView.Columns.Add("quantita", 150, HorizontalAlignment.Left);

            //order list
            ordersListView.View = View.Details;
            ordersListView.Columns.Add("ID", 150, HorizontalAlignment.Left);
            ordersListView.Columns.Add("Cliente", 150, HorizontalAlignment.Left);
            ordersListView.Columns.Add("Data Ordine", 300, HorizontalAlignment.Center);
            ordersListView.Columns.Add("Totale", 200, HorizontalAlignment.Left);

            //customer list
            customerListView.View = View.Details;
            customerListView.Columns.Add("ID", 150, HorizontalAlignment.Left);
            customerListView.Columns.Add("Cognome", 150, HorizontalAlignment.Left);
            customerListView.Columns.Add("Nome", 300, HorizontalAlignment.Center);
            customerListView.Columns.Add("Data Nascita", 200, HorizontalAlignment.Left);
            customerListView.Columns.Add("Codice Fiscale", 200, HorizontalAlignment.Left);
            customerListView.Columns.Add("Ruolo", 200, HorizontalAlignment.Left);

            brandListView.View = View.Details;
            brandListView.Columns.Add("ID", 150, HorizontalAlignment.Left);
            brandListView.Columns.Add("Nome", 300, HorizontalAlignment.Center);

            categoryListView.View = View.Details;
            categoryListView.Columns.Add("ID", 150, HorizontalAlignment.Left);
            categoryListView.Columns.Add("Nome", 300, HorizontalAlignment.Center);

            this.loadProducts();
            this.loadOrders();
            this.loadCustomers();
            this.loadBrands();
            this.loadCategories();
        }