コード例 #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
ファイル: 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;
            }
        }