Exemplo n.º 1
0
        private ShouldBeOnStockDataSet GenerateDataSet()
        {
            ShouldBeOnStockDataSet dataSet = new ShouldBeOnStockDataSet();

            AddAdditionalInformation(dataSet);
            AddDetails(dataSet);
            return(dataSet);
        }
Exemplo n.º 2
0
        public void AddDetails(ShouldBeOnStockDataSet dataSet)
        {
            List <StockComponentInfo> stockDetailInfos = new List <StockComponentInfo>();

            if (_currentStore != null)
            {
                stockDetailInfos.AddRange(GlobalObjects.StockCalculator.GetStockComponentInfosWithCalculation(_currentStore));
            }

            stockDetailInfos.Sort(new StockDetailInfosComparer());
            for (int i = 0; i < stockDetailInfos.Count; i++)
            {
                dataSet.Details.AddDetailsRow(stockDetailInfos[i].PartNumber,
                                              stockDetailInfos[i].Description,
                                              stockDetailInfos[i].Current + " / " + stockDetailInfos[i].ShouldBeOnStock,
                                              stockDetailInfos[i].Current < stockDetailInfos[i].ShouldBeOnStock ? 1 : 0);
            }
        }
Exemplo n.º 3
0
        public void AddAdditionalInformation(ShouldBeOnStockDataSet dataSet)
        {
            byte[] operatorLogotype;
            string reportHeader;
            string location = "";

            if (_currentStore != null)
            {
                operatorLogotype = _currentStore.Operator.LogoTypeWhite;
                reportHeader     = _currentStore.ItemId + ". Should be on stock";
                location         = _currentStore.Location;
            }
            else
            {
                operatorLogotype = _currentOperator.LogoTypeWhite;
                reportHeader     = _currentOperator.Name + ". Should be on stock";
            }
            dataSet.AdditionalDataTable.AddAdditionalDataTableRow(reportHeader, location,
                                                                  new GlobalTermsProvider()["ReportFooter"].ToString(),
                                                                  new GlobalTermsProvider()["ReportFooterPrepared"].
                                                                  ToString(),
                                                                  new GlobalTermsProvider()["ReportFooterLink"].ToString(),
                                                                  operatorLogotype);
        }