Beispiel #1
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;
        }
Beispiel #2
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;
        }
Beispiel #3
0
        /* Выполняем в конструкторе */
        private void GetStarted(string _categoryName, string _prodTypeName)
        {
            ptController  = new ProductTypesController(this);
            kcController  = new KeywordCategoryController(this);
            fscController = new FullSemCoreController(this);

            ptController.GetProductTypesAll();
            fill_cb_ProductTypes();
            kcController.GetKeywordCategoriesByProductId(GetProductTypeIdFromCB());
            fill_cb_KeywordCategory();
            fscController.GetSemCoreByProductAndCategory(GetProductTypeIdFromCB(), GetKeywordCategoryIdFromCB());

            for (int i = 0; i < cb_ProductType.Items.Count; i++)
            {
                if (cb_ProductType.Items[i].ToString().Equals(_prodTypeName))
                {
                    cb_ProductType.SelectedItem = cb_ProductType.Items[i];
                }
            }

            for (int i = 0; i < cb_KeywordCategory.Items.Count; i++)
            {
                if (cb_KeywordCategory.Items[i].ToString().Equals(_categoryName))
                {
                    cb_KeywordCategory.SelectedItem = cb_KeywordCategory.Items[i];
                }
            }

            ShowKeywords();
        }
Beispiel #4
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;
            }
        }
Beispiel #5
0
        /* Конструктор */
        public ProductsView()
        {
            InitializeComponent();
            connection = DBData.GetDBConnection();

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

            FillAllFields();
        }
Beispiel #6
0
        /* Выполняем в конструкторе */
        private void GetStarted()
        {
            ptController  = new ProductTypesController(this);
            kcController  = new KeywordCategoryController(this);
            scaController = new SemCoreArchiveController(this);

            ptController.GetProductTypesAll();
            fill_cb_ProductTypes();
            kcController.GetKeywordCategoriesByProductId(GetProductTypeIdFromCB());
            fill_cb_KeywordCategory();
        }
Beispiel #7
0
        /* Выполняем в конструкторе */
        private void GetStarted()
        {
            ptController  = new ProductTypesController(this);
            kcController  = new KeywordCategoryController(this);
            fscController = new FullSemCoreController(this);

            fscController.GetSemCoreAll();
            ptController.GetProductTypesAll();
            kcController.GetKeywordCategoriesAll();
            DrawKeywords();
            FillCB();
        }
Beispiel #8
0
        /* Выполняем в конструкторе */
        private void GetStarted()
        {
            ptController  = new ProductTypesController(this);
            kcController  = new KeywordCategoryController(this);
            fscController = new FullSemCoreController(this);

            ptController.GetProductTypesAll();
            fill_cb_ProductTypes();
            kcController.GetKeywordCategoriesByProductId(GetProductTypeIdFromCB());
            fill_cb_KeywordCategory();
            fscController.GetSemCoreByProductAndCategory(GetProductTypeIdFromCB(), GetKeywordCategoryIdFromCB());
        }
Beispiel #9
0
        public ProductTypesView()
        {
            InitializeComponent();
            CurrentColumnCount = 0;

            ptController = new ProductTypesController(this);

            connection = DBData.GetDBConnection();

            ptController.GetProductTypesAll();
            Draw();
        }
Beispiel #10
0
        /* Конструктор */
        public SemCoreView()
        {
            InitializeComponent();
            CurrentColumnCount = 0;

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

            kcController.GetKeywordCategoriesAll();
            ptController.GetProductTypesAll();
            Fill_CB_ByKeywordCategories();
            Fill_CB_ByProductTypes();
        }
Beispiel #11
0
        /* Конструктор */
        public ProductTypesView(MainFormView _mf)
        {
            InitializeComponent();

            ptController = new ProductTypesController(this);

            controlMainFormView = _mf;

            ptController.GetProductTypesAll();
            Draw();

            if (dgv_ProductTypes.RowCount > 0)
            {
                label1.Visible           = false;
                dgv_ProductTypes.Visible = true;
            }
        }
Beispiel #12
0
        /* Конструктор */
        public SemCoreView(MainFormView _mf)
        {
            InitializeComponent();
            CurrentColumnCount = 0;

            mf = _mf;

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

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

            tb_Link.Text = mf.AmazonLink;
        }
Beispiel #13
0
        /* Конструктор */
        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();
        }
Beispiel #14
0
        /* Выполняем в конструкторе */
        private void GetStarted()
        {
            btn_Begin.Enabled       = false;
            btn_KeysAreDone.Enabled = false;
            btn_Begin.Enabled       = true;
            btn_KeysAreDone.Enabled = true;
            btn_Begin.Enabled       = false;
            btn_KeysAreDone.Enabled = false;

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

            ptController.GetProductTypesAll();
            fill_cb_ProductTypes();
            kcController.GetKeywordCategoriesByProductId(GetProductTypeIdFromCB());
            fill_cb_KeywordCategory();
        }
Beispiel #15
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;
        }