Пример #1
0
        public ReportBusinessUploadView(MainFormView _mf, string _mode)
        {
            InitializeComponent();
            mf        = _mf;
            FirstLoad = true;

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

            DaysDiff         = (EndDate - StartDate).Days + 1;
            lb_DaysDiff.Text = "Разница дат - " + DaysDiff;

            lb_startDateText.Text = StartDate.ToString().Substring(0, 10);
            lb_endDateText.Text   = EndDate.ToString().Substring(0, 10);

            lb_mcDate.Text = UpdateDate.ToString().Substring(0, 10);

            businessList = new List <ReportBusinessModel> {
            };

            mpList        = new List <MarketplaceModel> {
            };
            pList         = new List <ProductsModel> {
            };
            FileNames     = new List <string> {
            };
            missedColumns = new List <int> {
            };

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

            if (_mode.Equals("upload"))
            {
                UploadMode    = true;
                UpdateMode    = false;
                this.Text     = "Загрузить Business Report";
                btn_Save.Text = "Сохранить";
            }
            else if (_mode.Equals("update"))
            {
                UploadMode    = false;
                UpdateMode    = true;
                this.Text     = "Обновить Business Report";
                btn_Save.Text = "Обновить";
            }

            if (mpController.GetMarketplaces() == 1)
            {
                Fill_CB_Marketplace();
            }

            prodController.GetProductsAllJOIN();


            FirstLoad = false;
        }
Пример #2
0
        public EveryDayReportsUpdate(MainFormView _mf)
        {
            InitializeComponent();
            mf = _mf;

            //path = @ConfigurationManager.AppSettings.Get("reportsPath");
            path           = "D:\\BonaFides - отчеты\\!test_tmp\\everyday";
            adv_path       = path + "\\Advertising";
            bus_path       = path + "\\Business-Reports";
            inventory_path = path + "\\Amazon-check-stock";
            orders_path    = path + "\\All-orders";



            updatedRowsCount = 0;

            advProductsList = new List <AdvertisingProductsModel> {
            };
            advBrandsList   = new List <AdvertisingBrandsModel> {
            };
            campTList       = new List <CampaignTypesModel> {
            };
            pList           = new List <ProductsModel> {
            };
            businessList    = new List <ReportBusinessModel> {
            };
            missedColumns   = new List <int> {
            };

            businessController = new BusinessController(this);
            campTController    = new CampaignTypesController(this);
            advertController   = new AdvertisingController(this);
            prodController     = new ProductsController(this);
            reportDataAnalyzer = new ReportDataAnalyzer(this);

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

            advProductsListOfErrors = new List <AdvertisingProductsModel> {
            };
            advBrandsListOfErrors   = new List <AdvertisingBrandsModel> {
            };

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

            mpList = new List <Marketplace> {
                new Marketplace(1, "PowerDeWise (USA)", "pdw usa"), new Marketplace(2, "PowerDeWise (CA)", "pdw ca"), new Marketplace(3, "PowerDeWise (AU)", "pdw au"), new Marketplace(4, "PowerDeWise (MX)", "pdw mx"), new Marketplace(5, "LetIt.Beer (USA)", "letit beer usa"), new Marketplace(6, "LetIt.Beer (CA)", "letit beer ca"), new Marketplace(7, "PowerDeWise (JP)", "pdw jp"), new Marketplace(8, "Others", "others")
            };

            prodController.GetProductsAllJOIN();
        }
Пример #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();
            }
        }