Exemple #1
0
 /// <summary>
 /// Initialize information for ReportWindow to display report for Item expirations
 /// </summary>
 /// <param name="reportWindow"></param>
 private void initializeExpirationReport(ReportWindow reportWindow)
 {
     reportWindow.whichReport   = WhichReport.Expiration;
     reportWindow.reportColumns = new List <ReportColumn>()
     {
         new ReportColumn("Item Description", "description", ListSortDirection.Ascending),
         new ReportColumn("Quantity", "quantity"),
         new ReportColumn("Location", "location"),
         new ReportColumn("Expiration", "expirationDate"),
     };
 }
Exemple #2
0
 /// <summary>
 /// Initialize information for ReportWindow to display report for Item service
 /// </summary>
 /// <param name="reportWindow"></param>
 private void initializeServiceReport(ReportWindow reportWindow)
 {
     reportWindow.whichReport   = WhichReport.Service;
     reportWindow.reportColumns = new List <ReportColumn>()
     {
         new ReportColumn("Vendor", "col1"),
         new ReportColumn("Item Number", "itemNumber"),
         new ReportColumn("Item Name", "description", ListSortDirection.Ascending),
         new ReportColumn("Service Due", "col1"),
         new ReportColumn("Service Done", "col2"),
     };
 }
Exemple #3
0
 /// <summary>
 /// Initialize information for ReportWindow to display report for Item weights
 /// </summary>
 /// <param name="reportWindow"></param>
 private void initializeWeightReport(ReportWindow reportWindow)
 {
     reportWindow.whichReport   = WhichReport.Weight;
     reportWindow.reportColumns = new List <ReportColumn>()
     {
         new ReportColumn("Location", "location"),
         new ReportColumn("Bin", "col1"),
         new ReportColumn("Module", "col2"),
         new ReportColumn("Standalone Item", "description", ListSortDirection.Ascending),
         new ReportColumn("Weight", "weight"),
     };
 }
Exemple #4
0
 /// <summary>
 /// Initialize information for ReportWindow to display report for Vendor cost
 /// </summary>
 /// <param name="reportWindow"></param>
 private void initializeVendorCostReport(ReportWindow reportWindow)
 {
     reportWindow.whichReport   = WhichReport.VendorCost;
     reportWindow.reportColumns = new List <ReportColumn>()
     {
         new ReportColumn("Vendor", "col1"),
         new ReportColumn("Item Name", "description", ListSortDirection.Ascending),
         new ReportColumn("Unit Cost", "weight"),
         new ReportColumn("Quantity", "quantity"),
         new ReportColumn("Total Cost", "weight"),
     };
 }
Exemple #5
0
 /// <summary>
 /// Initialize information for ReportWindow to display report for Item Status
 /// </summary>
 /// <param name="reportWindow"></param>
 private void initializeItemStatusReport(ReportWindow reportWindow)
 {
     reportWindow.whichReport   = WhichReport.ItemStatus;
     reportWindow.reportColumns = new List <ReportColumn>()
     {
         new ReportColumn("Item Status", "status"),
         new ReportColumn("Item Description", "description", ListSortDirection.Ascending),
         new ReportColumn("Quantity", "quantity"),
         new ReportColumn("Bin / Module Container", "binOrModule"),
         new ReportColumn("Item Number", "itemNumber"),
     };
 }
Exemple #6
0
 /// <summary>
 /// Initialize information for ReportWindow to display report for Inventory Summary
 /// </summary>
 /// <param name="reportWindow"></param>
 private void initializeInventorySummaryReport(ReportWindow reportWindow)
 {
     //reportWindow.reportName = "My Report's name";
     reportWindow.whichReport   = WhichReport.InventorySummary;
     reportWindow.reportColumns = new List <ReportColumn>()
     {
         new ReportColumn("Item Description", "description", ListSortDirection.Ascending),
         new ReportColumn("Quantity", "quantity"),
         new ReportColumn("Location", "location"),
         new ReportColumn("Bin / Module Container", "binOrModule"),
         new ReportColumn("Expiration", "expirationDate"),
     };
 }
Exemple #7
0
 /// <summary>
 /// Initialize information for ReportWindow to display report for Item deployments
 /// </summary>
 /// <param name="reportWindow"></param>
 private void initializeDeploymentReport(ReportWindow reportWindow)
 {
     reportWindow.whichReport   = WhichReport.Deployment;
     reportWindow.reportColumns = new List <ReportColumn>()
     {
         new ReportColumn("Item Number", "itemNumber"),
         new ReportColumn("Item Name", "description", ListSortDirection.Ascending),
         new ReportColumn("Site", "col1"),
         new ReportColumn("Deployed By", "col2"),
         new ReportColumn("Date", "col1"),
         new ReportColumn("Returned By", "col2"),
         new ReportColumn("Date", "col1"),
     };
 }
Exemple #8
0
 /// <summary>
 /// Initialize information for ReportWindow to display report for Item damage or missing
 /// </summary>
 /// <param name="reportWindow"></param>
 private void initializeDamagedOrMissingReport(ReportWindow reportWindow)
 {
     reportWindow.whichReport   = WhichReport.DamagedOrMissing;
     reportWindow.reportColumns = new List <ReportColumn>()
     {
         new ReportColumn("Site Location", "col1"),
         new ReportColumn("Status", "status"),
         new ReportColumn("Discovered", "col2"),
         new ReportColumn("Vendor Name", "col1"),
         new ReportColumn("Bin", "col1"),
         new ReportColumn("Module", "col2"),
         new ReportColumn("Item Number", "itemNumber"),
         new ReportColumn("Name", "description", ListSortDirection.Ascending),
         new ReportColumn("Requested Action", "col1"),
         new ReportColumn("Damage", "col1"),
         new ReportColumn("Event Details", "col1"),
         new ReportColumn("Reported By", "col1"),
         new ReportColumn("Contact Info", "col1"),
     };
 }
Exemple #9
0
        /// <summary>
        /// Route to appropriate window
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainMenuAction(object param)
        {
            Window         newWin       = null;
            SimpleTreeItem selectedItem = param as SimpleTreeItem;

            logger.Info($"MainMenuAction - invoking: { selectedItem?.tag ?? "null" }");
            if (selectedItem?.label != null)
            {
                StatusLabel.Content = selectedItem.label;
            }
            else
            {
                StatusLabel.Content = "";
            }

            switch (selectedItem?.tag)
            {
            // expandable section or other control with no action associated with it
            case null:
                return;     // exit early and don't show internal error message

            // log off
            case "LogOut":
                LogOutBtn();
                return;

            // reports
            case "ReportSummary":
                newWin = new ReportWindow("Inventory Report");
                initializeInventorySummaryReport((ReportWindow)newWin);
                break;

            case "ReportItemStatus":
                newWin = new ReportWindow("Item Status Report");
                initializeItemStatusReport((ReportWindow)newWin);
                break;

            case "ReportVendorCost":
                newWin = new ReportWindow("Vendor Cost Report");
                initializeVendorCostReport((ReportWindow)newWin);
                break;

            case "ReportWeight":
                newWin = new ReportWindow("Weight Report");
                initializeWeightReport((ReportWindow)newWin);
                break;

            case "ReportExpiration":
                newWin = new ReportWindow("Expiration Report");
                initializeExpirationReport((ReportWindow)newWin);
                break;

            case "ReportService":
                newWin = new ReportWindow("Service Report");
                initializeServiceReport((ReportWindow)newWin);
                break;

            case "ReportDeployment":
                newWin = new ReportWindow("Deployment Report");
                initializeDeploymentReport((ReportWindow)newWin);
                break;

            case "ReportDamaged":
                newWin = new ReportWindow("Missing/Damaged Report");
                initializeDamagedOrMissingReport((ReportWindow)newWin);
                break;

            default:
                newWin = ViewModelToWindowMapper.GetWindow(selectedItem?.tag);
                break;
            }

            if (newWin == null)
            {
                MessageBox.Show("Internal Error selecting item", "Internal Error:", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            else
            {
                try
                {
                    App.Current.MainWindow = newWin;
                    newWin.Owner           = this;
                    newWin.ShowDialog();
                }
                catch (Exception e)
                {
                    logger.Error(e, $"Internal error - {e.Message}");
                    throw;
                }
            }
        }