Exemple #1
0
        public override void InitGridControlDataSource()
        {
            InventoryStatisticsEntities entity = (InventoryStatisticsEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity;
            BindingSource bds = new BindingSource();

            bds.DataSource = entity.ICTransactionStatisticsList;
            DataSource     = bds;
        }
Exemple #2
0
        public void InventoryStatistics()
        {
            int?     stockID        = StockLookup.EditValue == null ? (int?)null : Convert.ToInt32(StockLookup.EditValue);
            int?     productID      = ProductLookup.EditValue == null ? (int?)null : Convert.ToInt32(ProductLookup.EditValue);
            bool     isGroupByStock = IsGroupByStock.Checked;
            DateTime fromDate       = Convert.ToDateTime(FromDateDateEdit.EditValue);
            DateTime toDate         = Convert.ToDateTime(ToDateDateEdit.EditValue);

            ICTransactionsController  controller          = new ICTransactionsController();
            List <ICTransactionsInfo> inventoryStatistics = controller.GetInventoryStatistics(fromDate, toDate, productID, stockID, isGroupByStock);

            InventoryStatisticsEntities entity = (InventoryStatisticsEntities)CurrentModuleEntity;

            entity.ICTransactionStatisticsList.Invalidate(inventoryStatistics);
        }
Exemple #3
0
        public InventoryStatisticsModule()
        {
            this.CurrentModuleName     = "InventoryStatistics";
            CurrentModuleEntity        = new InventoryStatisticsEntities();
            CurrentModuleEntity.Module = this;
            InitializeModule();

            FromDateDateEdit           = (VinaDateEdit)Controls[InventoryStatisticsModule.FromDateDateEditControlName];
            ToDateDateEdit             = (VinaDateEdit)Controls[InventoryStatisticsModule.ToDateDateEditControlName];
            StockLookup                = (VinaLookupEdit)Controls[InventoryStatisticsModule.StockLookupControlName];
            ProductLookup              = (VinaLookupEdit)Controls[InventoryStatisticsModule.ProductLookupControlName];
            IsGroupByStock             = (VinaCheckBox)Controls[InventoryStatisticsModule.IsGroupByStockControlName];
            FromDateDateEdit.EditValue = DateTime.Now;
            ToDateDateEdit.EditValue   = DateTime.Now.AddDays(7);
        }