예제 #1
0
        public ReportStockUploadView(MainFormView _mf)
        {
            InitializeComponent();
            mf = _mf;

            UpdateDate = DateTime.Today;

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

            stockList = new List <StockModel> {
            };

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

            insertedCount = 0;

            if (mpController.GetMarketplaces() == 1)
            {
                Fill_CB_Marketplace();
            }
        }
예제 #2
0
        /* Конструктор */
        public ProductsView(MainFormView _mf)
        {
            InitializeComponent();
            connection = DBData.GetDBConnection();
            mf         = _mf;

            firstStart = true;

            pController  = new ProductsController(this);
            ptController = new ProductTypesController(this);
            mpController = new MarketplaceController(this);

            FillAllFields();

            if (mf.um.UserRoleId != 0 && mf.um.UserRoleId != 1)     //если не админ и не босс, а просто юзер
            {
                groupBox1.Visible              = false;
                groupBox2.Visible              = false;
                btn_Help.Visible               = false;
                label1.Location                = new Point(587, 610);
                rtb_FindFieldName.Location     = new Point(531, 626);
                checkbox_ActiveStatus.Location = new Point(554, 655);
                btn_Help.Location              = new Point(4, 605);
                this.Height = 716;
            }

            if (dgv_Products.RowCount > 0)
            {
                label2.Visible       = false;
                dgv_Products.Visible = true;
            }

            firstStart = false;
        }
예제 #3
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;
        }
예제 #4
0
        public Advreport7days(DateTime _selectedDateTime)
        {
            connection = DBData.GetDBConnection();

            advProductsListNew        = new List <AdvertisingProductsModel> {
            };
            summaryAdvProductsListNew = new List <AdvertisingProductsModel> {
            };

            advProductsListOld        = new List <AdvertisingProductsModel> {
            };
            summaryAdvProductsListOld = new List <AdvertisingProductsModel> {
            };

            advProductsListTmp = new List <AdvertisingProductsModel> {
            };
            resultString       = new List <string> {
            };

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

            resultList = new List <ReportObject> {
            };

            prodControl = new ProductsController(this);

            marketplaceControl = new MarketplaceController(this);

            selectedStart = _selectedDateTime;
        }
예제 #5
0
        /* Конструктор */
        public SemCoreView(MainFormView _mf)
        {
            InitializeComponent();

            mf = _mf;

            scController  = new SemCoreController(this);
            kcController  = new KeywordCategoryController(this);
            ptController  = new ProductTypesController(this);
            scaController = new SemCoreArchiveController(this);
            mpController  = new MarketplaceController(this);


            NoProdType = false;
            NoKeyCat   = false;

            mpController.GetMarketplaces();
            Fill_CB_ByMarketplaces();
            ptController.GetProductTypesAll();
            Fill_CB_ByProductTypes();
            kcController.GetKeywordCategoriesByProductId(currentProductTypeId);
            Fill_CB_ByKeywordCategories();

            urlAmazon    = ConfigurationManager.AppSettings.Get("amzLink").ToString();
            tb_Link.Text = urlAmazon;
        }
예제 #6
0
        /* Конструктор */
        public ProductsView(MainFormView _mf, bool _permissionFlag)
        {
            InitializeComponent();
            connection     = DBData.GetDBConnection();
            mf             = _mf;
            PermissionFlag = _permissionFlag;

            firstStart = true;

            pController  = new ProductsController(this);
            ptController = new ProductTypesController(this);
            mpController = new MarketplaceController(this);

            FillAllFields();


            if (dgv_Products.RowCount > 0)
            {
                label2.Visible       = false;
                dgv_Products.Visible = true;
            }

            firstStart = false;
            if (PermissionFlag)
            {
                groupBox2.Visible = true;
            }
        }
예제 #7
0
파일: LoggerAdd.cs 프로젝트: lolodin7/ahead
        public LoggerAdd(LoggerView _mf, UserModel _um)
        {
            InitializeComponent();
            loggerViewControl = _mf;

            creationDate = DateTime.Now;

            uList = _um;

            pList              = new List <ProductsModel> {
            };
            mpList             = new List <MarketplaceModel> {
            };
            logList            = new List <LoggerModel> {
            };
            uniqueProductNames = new List <string> {
            };
            imageNamesForSave  = new List <string> {
            };
            asinSkuPairs       = new List <LoggerAddAsinSkuPairs> {
            };

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

            lb_creationDate.Text     = creationDate.ToString().Substring(0, 10);
            lb_CreationUserName.Text = uList.Name;


            mpController.GetMarketplaces();

            pController.GetProductsAllJOIN();
            pList = pList.Distinct().ToList <ProductsModel>();
            Fill_CB_ByProducts();



            pbList = new List <PictureBox> {
            };
            pbList.Add(pictureBox1);
            pbList.Add(pictureBox2);
            pbList.Add(pictureBox3);
            pbList.Add(pictureBox4);
            pbList.Add(pictureBox5);
            pbList.Add(pictureBox6);
            pbList.Add(pictureBox7);
            pbList.Add(pictureBox8);
            pbList.Add(pictureBox9);
            pbList.Add(pictureBox10);
        }
예제 #8
0
        /* Конструктор */
        public ReportStockView(MainFormView _mf)
        {
            InitializeComponent();
            mf         = _mf;
            connection = DBData.GetDBConnection();
            cb_FilterParameter.SelectedIndex = 0;

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

            stockList       = new List <StockModel> {
            };
            pList           = new List <ProductsModel> {
            };
            mpList          = new List <MarketplaceModel> {
            };
            sales7daysList  = new List <AllOrdersModel> {
            };
            sales30daysList = new List <AllOrdersModel> {
            };

            filterEnabled = false;

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

            prodController.GetProductsAllJOIN();
            stockController.GetStock(DateTime.Today.AddDays(-10), DateTime.Today.AddHours(23).AddMinutes(59).AddSeconds(59));
            if (stockList.Count > 0)
            {
                GetLatestDateAndProcessStockList();
                CalcValues();
                DrawTableColumns();
                DrawTableValues();
            }
            else
            {
                dgv_Stock.Visible                = false;
                label3.Visible                   = true;
                cb_MarketPlace.Enabled           = false;
                cb_FilterParameter.Enabled       = false;
                rtb_FilterParameterValue.Enabled = false;
                btn_GoFilter.Enabled             = false;
            }
        }
예제 #9
0
        /* Конструктор */
        public MarketplaceView(MainFormView _mf)
        {
            InitializeComponent();

            label1.Text = "Marketplace отсутствуют";

            mpController = new MarketplaceController(this);

            controlMainFormView = _mf;

            mpController.GetMarketplaces();
            Draw();

            if (dgv_Marketplaces.RowCount > 0)
            {
                label1.Visible           = false;
                dgv_Marketplaces.Visible = true;
            }
        }
예제 #10
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();
            }
        }
예제 #11
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();
        }
예제 #12
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();
            }
        }
예제 #13
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();
        }