Exemplo n.º 1
0
        public ReportSalesView(MainFormView _mf)
        {
            InitializeComponent();
            mf = _mf;


            ordersList = new List <AllOrdersModel> {
            };

            dailyMode  = true;
            weeklyMode = false;
            customMode = false;
            //customMode = true;

            StartDate = DateTime.Today;
            EndDate   = DateTime.Today.AddHours(23).AddMinutes(59).AddSeconds(59);

            lb_StartDate.Text = StartDate.ToString().Substring(0, 10);
            lb_EndDate.Text   = StartDate.ToString().Substring(0, 10);


            mpList            = new List <MarketplaceModel> {
            };
            pList             = new List <ProductsModel> {
            };
            currentProductIds = new List <int> {
            };

            mpController   = new MarketplaceController(this);
            prodController = new ProductsController(this);

            checkedMarkeplaces           = new List <string> {
            };
            checkedProducts              = new List <ProductsModel> {
            };
            searchresultsCheckedProducts = new List <ProductsModel> {
            };

            if (mpController.GetMarketplaces() == 1)
            {
                Fill_CLB_Marketplace();
            }
        }
Exemplo n.º 2
0
        /* Главный конструктор */
        public ReportAdvertisingUploadView(MainFormView _mf)
        {
            InitializeComponent();
            mf = _mf;

            UpdateDate = DateTime.Today;
            StartDate  = DateTime.Today;
            EndDate    = DateTime.Today.AddHours(23).AddMinutes(59);

            advProductsList          = new List <AdvertisingProductsModel> {
            };
            advProductsListForUpdate = new List <AdvertisingProductsModel> {
            };
            summaryAdvProductsList   = new List <AdvertisingProductsModel> {
            };
            mpList    = new List <MarketplaceModel> {
            };
            pList     = new List <ProductsModel> {
            };
            datesList = new List <DateTime> {
            };

            mpController     = new MarketplaceController(this);
            advertController = new AdvertisingController(this);
            prodController   = new ProductsController(this);

            AP_campaignIdsList = new List <MapNameId> {
            };
            AB_campaignIdsList = new List <MapNameId> {
            };

            advProductsListOfErrors = new List <AdvertisingProductsModel> {
            };

            mpController.GetMarketplaces();

            advertController.GetAP_CampaignIds();
            advertController.GetAB_CampaignIds();
        }
Exemplo n.º 3
0
        private bool NoErrors;          //ошибка ввода в textBox пользователем при фильтре по таблице


        public ReportBusinessFilterView(ReportBusinessView _mf)
        {
            InitializeComponent();
            mf = _mf;

            StartDate         = DateTime.Today;
            EndDate           = DateTime.Today.AddHours(23).AddMinutes(59);
            lb_StartDate.Text = StartDate.ToString().Substring(0, 10);
            lb_EndDate.Text   = StartDate.ToString().Substring(0, 10);


            mpList              = new List <MarketplaceModel> {
            };
            pList               = new List <ProductsModel> {
            };
            businessList        = new List <ReportBusinessModel> {
            };
            summaryBusinessList = new List <ReportBusinessModel> {
            };
            filterBusinessListt = new List <ReportBusinessModel> {
            };

            mpController       = new MarketplaceController(this);
            prodController     = new ProductsController(this);
            businessController = new BusinessController(this);

            checkedMarkeplaces = new List <string> {
            };
            checkedProducts    = new List <string> {
            };

            if (mpController.GetMarketplaces() == 1)
            {
                Fill_CLB_Marketplace();
            }
        }
Exemplo n.º 4
0
        /* Конструктор */
        public LoggerView(MainFormView _mf, UserModel _um)
        {
            InitializeComponent();


            firstRun  = true;
            startDate = DateTime.Today;
            //endDate = DateTime.Now;
            endDate = DateTime.Today.AddHours(23).AddMinutes(59);

            asinFilter             = false;
            skuFilter              = false;
            productNameFilter      = false;
            creationUserNameFilter = false;

            productIdForFilter = creationUserIdForFilter = -1;
            asinForFilter      = skuForFilter = "Все";

            previousCountOfLogs = 0;
            connection          = DBData.GetDBConnection();
            mf        = _mf;
            userModel = _um;

            notifyIcon1.Visible = true;

            pList   = new List <ProductsModel> {
            };
            mpList  = new List <MarketplaceModel> {
            };
            logList = new List <LoggerModel> {
            };
            uList   = new List <UserModel> {
            };

            uniqueProductNames = new List <string> {
            };
            uniqueASINs        = new List <string> {
            };

            pController   = new ProductsController(this);
            mpController  = new MarketplaceController(this);
            logController = new LoggerController(this);
            lfController  = new LoginFormController(this);

            lb_StartDate.Text = startDate.ToString().Substring(0, 10);
            lb_EndDate.Text   = endDate.ToString().Substring(0, 10);
            label4.Text       = "С " + startDate.ToString().Substring(0, 10);
            label5.Text       = "По " + endDate.ToString().Substring(0, 10);


            mpController.GetMarketplaces();

            pController.GetProductsAllJOIN();
            Fill_CB_ByProducts();

            lfController.GetAllUsers();
            Fill_CB_ByUsers();

            logController.GetAllRecordsByDate(startDate, endDate);
            if (logList.Count > 0)
            {
                label6.Visible      = false;
                dgv_Log.Visible     = true;
                previousCountOfLogs = logList.Count;
                Draw_dgv_Logs();
            }

            timer1.Enabled = true;
            timer1.Start();
        }