/*--------------------------------------------------------------------------------*/ void Start() { SetCursorSpeed(8); if (mapping == MAPPING_TYPE.POLAR) { polarMapping = new PolarMapping(); polarMapping.HighResolutionActive(true); polarMapping.characterCtrl = characterCtrl; polarMapping.indicatorGrid = indicatorGrid; } else { meshMapping = new MeshMapping(indicatorGrid); meshMapping.characterCtrl = characterCtrl; } selectionExecuted = false; report.AddLine(RatiosToReportLine(STATE.INIT)); }
private void organizeByReportType(String team, List <string> lines) { Report currentReport = null; String reportTitle = ""; foreach (String line in lines) { Regex regex = new Regex(@"(.*) " + m_SeasonTitle); Match match = regex.Match(line); if (match.Success) { reportTitle = match.Groups[1].Value.Trim(); if (currentReport != null) { if (isNewReport(reportTitle, team)) { currentReport = loadReport(reportTitle, team); addReport(team, currentReport); } } else { currentReport = loadReport(reportTitle, team); addReport(team, currentReport); } } else { currentReport.AddLine(line); } } if (isNewReport(reportTitle, team)) { addReport(team, currentReport); } }
internal static void CreateNotReceiptReport(Database.Database db, DateTime reportAsOf) { if (db is null) { throw new ArgumentNullException(nameof(db)); } Report rpt = new Report("PendingReceipt"); ExpenseOrder[] allorders = db.GetOrders(); var orderables = db.GetOrderables(); // Get list of orders that have at least one item that has not been received //var orders = allorders.Where(currentOrder => currentOrder.orderedItems.Any(currentOrderedItem => currentOrderedItem.Value.HasBeenReceived())).ToArray(); var orders = allorders.Where(currentOrder => currentOrder.orderedItems.Any(currentOrderedItem => currentOrderedItem.Value.HasBeenReceived())); int totalNumberOfMissingItems = 0; orders.ToList().ForEach(x => x.orderedItems.ToList().ForEach(y => { if (!y.Value.HasBeenReceived()) { totalNumberOfMissingItems++; } })); rpt.AddHeader("Introduction"); rpt.AddBlank(); rpt.AddLine($"This file describes the pending status of pharmacy expense items. This file is accurate as of {reportAsOf.ToShortDateString()}. There are {orders.Count(x=>x.orderedItems.Any(x=>!x.Value.HasBeenReceived()))} orders with pending items. There are {totalNumberOfMissingItems} items that are pending. These items are critical to the operation of the pharmacy."); rpt.AddBlank(); rpt.AddHeader("Orders with Pending Items"); rpt.AddLine("The following orders have pending items."); List <string> data = new List <string>(); orders.ToList().ForEach(x => { data.Add(x.OrderDate.ToShortDateString()); data.Add(x.orderedItems.Count(y => !y.Value.HasBeenReceived()).ToString()); }); rpt.AddBlank(); rpt.AddTable(new string[] { "Order Date", "Number of Pending Items" }, data.ToArray()); rpt.AddBlank(); rpt.AddHeader("Number of Pending Items per Wic"); rpt.AddLine("The following are the number of items for each wic that are pending"); rpt.AddBlank(); data = new List <string>(); Dictionary <int, int> wicToPendingItemCountMap = new Dictionary <int, int>(); orders.ToList().ForEach(currentOrder => currentOrder.orderedItems.ToList().ForEach(currentItem => { if (!currentItem.Value.HasBeenReceived()) { if (wicToPendingItemCountMap.ContainsKey(currentItem.Key.Wic)) { wicToPendingItemCountMap[currentItem.Key.Wic] += currentItem.Value.orderedAmount; } else { wicToPendingItemCountMap.Add(currentItem.Key.Wic, currentItem.Value.orderedAmount); } } })); foreach (KeyValuePair <int, int> item in wicToPendingItemCountMap) { Console.Write($"{item.Key}, {orderables.First(x=>x.Wic == item.Key).ItemName}, {item.Value}"); } rpt.AddTable(new string[] { "Wic", "Item Name", "Number of Pending Items" }, data.ToArray()); rpt.SaveReport(); }
private ReportLine AddSubLine(ReportLine parent, string title, int?value) { return(Report.AddLine(title, value, "sub", this.ColNum, 4, parent)); }
private ReportLine AddLine(ReportLine parent, string title, int?value) { return(Report.AddLine(title, value, "norm", this.ColNum, 3, parent)); }
private ReportLine AddHeader(ReportLine parent, string title) { return(Report.AddLine(title, null, "h3", this.ColNum, 2, parent)); }