コード例 #1
0
ファイル: Advreport7days.cs プロジェクト: lolodin7/ahead
        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;
        }
コード例 #2
0
ファイル: ProductsView.cs プロジェクト: lolodin7/ahead
        /* Конструктор */
        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 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;
            }
        }
コード例 #4
0
        //public CurrencyController(SomeForm _mf)
        public CurrencyController()
        {
            connection   = DBData.GetDBConnection();
            currencyList = new List <CurrencyModel> {
            };

            //ControlSomeForm = _mf;
        }
コード例 #5
0
        public AllOrdersView(MainFormView _mf)
        {
            InitializeComponent();
            connection = DBData.GetDBConnection();
            mf         = _mf;

            DrawTable();
        }
コード例 #6
0
ファイル: ChooseProduct.cs プロジェクト: lolodin7/ahead
        public ChooseProduct(MainFormView _mf)
        {
            InitializeComponent();
            connection  = DBData.GetDBConnection();
            mf          = _mf;
            OpenSuccess = false;

            getDBProductSKUInfo();
        }
コード例 #7
0
ファイル: ProductsView.cs プロジェクト: lolodin7/ahead
        /* Конструктор */
        public ProductsView()
        {
            InitializeComponent();
            connection = DBData.GetDBConnection();

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

            FillAllFields();
        }
コード例 #8
0
        /* Главный конструктор */
        public AllOrdersView(MainFormView _mf)
        {
            InitializeComponent();
            connection = DBData.GetDBConnection();
            mf         = _mf;

            ordersList = new List <AllOrdersModel> {
            };

            DrawTable();
        }
コード例 #9
0
ファイル: KeywordCategoryView.cs プロジェクト: lolodin7/ahead
        public KeywordCategoryView()
        {
            InitializeComponent();
            CurrentColumnCount = 0;

            kcController = new KeywordCategoryController(this);

            connection = DBData.GetDBConnection();

            kcController.GetKeywordCategoriesAll();
            Draw();
        }
コード例 #10
0
        public ProductTypesView()
        {
            InitializeComponent();
            CurrentColumnCount = 0;

            ptController = new ProductTypesController(this);

            connection = DBData.GetDBConnection();

            ptController.GetProductTypesAll();
            Draw();
        }
コード例 #11
0
        /* Конструктор */
        public SemCoreRebuildView(Form _mf)
        {
            InitializeComponent();
            connection           = DBData.GetDBConnection();
            mf                   = _mf;
            lb_NewKeys.Text      = str_NewKeys;
            lb_UpdatedKeys.Text  = str_UpdatedKeys;
            lb_UploadedKeys.Text = str_UploadedKeys;



            firstLoad = false;
        }
コード例 #12
0
ファイル: IndexingView.cs プロジェクト: lolodin7/ahead
        /* Конструктор */
        public IndexingView(MainFormView _mf)
        {
            InitializeComponent();

            controlMainFormView = _mf;
            connection          = DBData.GetDBConnection();
            imNEWList           = new List <IndexingModel> {
            };
            todayDate           = DateTime.Now;
            smList     = new List <SemanticsModel> {
            };
            AmazonLink = _mf.AmazonLink;

            GetStarted();
        }
コード例 #13
0
ファイル: ReportStockView.cs プロジェクト: lolodin7/ahead
        /* Конструктор */
        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;
            }
        }
コード例 #14
0
        //------------------------------------------------------------------REGION----------------------------------------------------------------
        #region My Methods

        private void getStarted()
        {
            btn_TransformDescr.Text     = "П\nр\nе\nо\nб\nр\nа\nз\nо\nв\nа\nт\nь\n";
            btn_ReplaceTexts.Text       = "S\nw\na\np\n";
            reverseDescriptionTransform = true;
            CheckForUnsavedChanges      = false;
            CurrentDay = DateTime.Today.Day;      //По этому признаку определяем версию семантики в течении одного сеанса
            connection = DBData.GetDBConnection();

            getDBFieldsLength();
            getDBKeywords();
            getDBFields();
            getDBProductInfo();

            CheckForUnsavedChanges = false;
        }
コード例 #15
0
ファイル: MainFormView.cs プロジェクト: lolodin7/ahead
        private bool Permissions = true;   //false - обычный пользователь, true - admin

        /* Главный коструктор */
        public MainFormView()
        {
            InitializeComponent();

            if (!Permissions)
            {
                //показывает картинку при запуске программы
                StartImage startImg = new StartImage();
                startImg.Show();
                this.Refresh();
                startImg.Refresh();
                System.Threading.Thread.Sleep(2000);
                startImg.Close();
                //перестали показывать картинку при запуске программы
            }

            if (!Permissions)
            {
                int prC = 0;
                foreach (Process pr in Process.GetProcesses())
                {
                    if (pr.ProcessName == "Bona Fides")
                    {
                        prC++;
                    }
                }
                if (prC > 1)
                {
                    MessageBox.Show("Приложение уже запущено!", "Ошибка");
                    Process.GetCurrentProcess().Kill();
                }
            }

            connection = DBData.GetDBConnection();
            if (connection.ConnectionString.Equals(""))
            {
                MessageBox.Show("Проблема при подключении к серверу. Перезапустите приложение или попробуйте позже.", "Ошибка");
                menuStrip1.Enabled   = false;
                statusStrip1.Visible = false;
            }
            else
            {
                GetStatus();
            }

            addSectionToolStripMenuItem1.Visible = Permissions;
        }
コード例 #16
0
ファイル: ChooseProduct.cs プロジェクト: lolodin7/ahead
        /* Вызываем для редактирования семантики продукта */
        public ChooseProduct(MainFormView _mf)
        {
            InitializeComponent();

            label2.Text = "Товары в системе отсутствуют";

            connection  = DBData.GetDBConnection();
            pmList      = new List <ProductsModel> {
            };
            mf          = _mf;
            OpenSuccess = false;
            isNew       = false;

            getDBProductSKUInfo();
            getUniquesASIN();
            SetDataToDGV();
        }
コード例 #17
0
        /* Конструктор, вызываем в форме KeywordsAreExisted*/
        public SemCoreRebuildView()
        {
            InitializeComponent();
            connection           = DBData.GetDBConnection();
            scaController        = new SemCoreArchiveController(this);
            lb_UpdatedKeys.Text  = str_UpdatedKeys;
            lb_UploadedKeys.Text = str_UploadedKeys;

            NoProdType = false;
            NoKeyCat   = false;

            GetStarted();
            firstLaunch = false;

            urlAmazon    = ConfigurationManager.AppSettings.Get("amzLink").ToString();
            tb_Link.Text = urlAmazon;
        }
コード例 #18
0
ファイル: KeywordCategoryView.cs プロジェクト: lolodin7/ahead
        /* Конструктор */
        public KeywordCategoryView(SemCoreView _mf)
        {
            InitializeComponent();

            kcController = new KeywordCategoryController(this);
            ptController = new ProductTypesController(this);

            HardClose = false;

            connection         = DBData.GetDBConnection();
            controlSemCoreView = _mf;

            kcController.GetKeywordCategoriesJOINProductTypes();
            Draw();

            ptController.GetProductTypesAll();
            fill_cb_ProductTypes();
        }
コード例 #19
0
ファイル: IndexingDetails.cs プロジェクト: lolodin7/ahead
        private bool isSaved;             //проверка, чтобы не выйти без сохранения

        /* Конструктор, если будем сохранять результаты индексации в БД */
        public IndexingDetails(int _productId, string _asin, string _sku, string _productName, IndexingStatus _mf, DateTime _date)
        {
            InitializeComponent();

            ProductId   = _productId;
            ASIN        = _asin;
            ProductName = _productName;
            Date        = _date;
            SKU         = _sku;

            controlIndexingStatus = _mf;
            connection            = DBData.GetDBConnection();

            isSaved = false;

            this.Text = ProductName + " : " + ASIN + ", " + SKU;

            GetAllProductWithSameASIN();
        }
コード例 #20
0
        private bool firstLoad;     //первая запуск формы, или нет

        public IndexingStatus(int _productId, string _asin, string _sku, string _productName, IndexingView _mf, DateTime _dt)
        {
            InitializeComponent();

            ProductId   = _productId;
            ASIN        = _asin;
            ProductName = _productName;
            SKU         = _sku;
            Date        = _dt;

            connection = DBData.GetDBConnection();

            controlIndexingView = _mf;
            firstLoad           = true;

            GetAllProductWithSameASIN();

            this.Text = ProductName + " : " + ASIN;
        }
コード例 #21
0
ファイル: ChooseProduct.cs プロジェクト: lolodin7/ahead
        /* Вызываем, если хотим создать семантику для продукта */
        public ChooseProduct(MainFormView _mf, bool _new)
        {
            InitializeComponent();

            label2.Text = "Товары в системе отсутствуют";

            connection  = DBData.GetDBConnection();
            pmList      = new List <ProductsModel> {
            };
            mf          = _mf;
            OpenSuccess = false;
            isNew       = _new;

            getDBProductSKUInfo();

            //проверяем, есть ли у них семантики
            getUniquesASIN(1);
            checkForExistingSemantics();

            SetDataToDGV(1);
        }
コード例 #22
0
        /* Конструктор */
        public SemCoreRebuildView()
        {
            InitializeComponent();
            connection           = DBData.GetDBConnection();
            lb_NewKeys.Text      = str_NewKeys;
            lb_UpdatedKeys.Text  = str_UpdatedKeys;
            lb_UploadedKeys.Text = str_UploadedKeys;

            kcController = new KeywordCategoryController(this);
            ptController = new ProductTypesController(this);
            scController = new SemCoreController(this);

            kcController.GetKeywordCategoriesAll();
            ptController.GetProductTypesAll();

            Fill_CB_ByKeywordCategories();
            Fill_CB_ByProductTypes();

            GetKeywords();

            firstLoad = false;
        }
コード例 #23
0
ファイル: IndexingDetails.cs プロジェクト: lolodin7/ahead
        /* Конструктор, просто смотрим результаты индексации за какое-то число */
        public IndexingDetails(int _productId, string _asin, string _sku, string _productName, IndexingView _mf, DateTime _date)
        {
            InitializeComponent();

            ProductId   = _productId;
            ASIN        = _asin;
            ProductName = _productName;
            Date        = _date;
            SKU         = _sku;

            controlIndexingView = _mf;
            connection          = DBData.GetDBConnection();

            this.Text        = ProductName + " : " + ASIN + ", " + SKU;
            btn_Save.Visible = false;

            isSaved = true;

            //тут метод для заполнения всех полей
            getDetailsFromDB();

            GetAllProductWithSameASIN();
        }
コード例 #24
0
ファイル: ChooseProduct.cs プロジェクト: lolodin7/ahead
        public ChooseProduct(AnalyticsForm _analyticsForm, string _value)
        {
            InitializeComponent();
            connection    = DBData.GetDBConnection();
            analyticsForm = _analyticsForm;
            OpenSuccess   = false;

            if (_value.Equals("sku"))
            {
                bySKU = true;
            }
            else
            {
                byASIN = true;
            }
            if (bySKU)
            {
                getDBProductSKUInfo();
            }
            else if (byASIN)
            {
                getDBProductASINInfo();
            }
        }
コード例 #25
0
ファイル: MainFormView.cs プロジェクト: lolodin7/ahead
 public MainFormView()
 {
     InitializeComponent();
     connection = DBData.GetDBConnection();
     AmazonLink = "https://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=";
 }
コード例 #26
0
ファイル: SemCoreController.cs プロジェクト: lolodin7/ahead
 /* Конструктор */
 public SemCoreController(SemCoreRebuildView _form)
 {
     connection = DBData.GetDBConnection();
     controlFormSemCoreRebuildView = _form;
 }
コード例 #27
0
ファイル: SemCoreController.cs プロジェクト: lolodin7/ahead
 /* Конструктор */
 public SemCoreController()
 {
     connection = DBData.GetDBConnection();
 }
コード例 #28
0
 /* Конструктор */
 public ProductTypesController(SemCoreRebuildView _controlForm)
 {
     connection = DBData.GetDBConnection();
     controlFormSemCoreRebuildView = _controlForm;
 }
コード例 #29
0
 /* Конструктор */
 public ProductTypesController(FullSemCoreView _controlForm)
 {
     connection = DBData.GetDBConnection();
     controlFormFullSemCoreView = _controlForm;
 }
コード例 #30
0
 /* Конструктор */
 public ProductTypesController(ProductsView _controlForm)
 {
     connection = DBData.GetDBConnection();
     controlFormProductsView = _controlForm;
 }