public string FindScannedItem(string scan) { //Find a carton scan in a Scan table DataSet ds = new DataSet(); string item = ""; try { ds = this.mMediator.FillDataset(App.USP_SCANFINDINTABLE, App.TBL_SCANFINDINTABLE, new object[] { scan }); OutboundFreightDS scanDS = new OutboundFreightDS(); scanDS.Merge(ds); if (scanDS.BwareScanTable.Rows.Count > 0) { item += "Scan TripNumber Scanned Station Cube \n"; item += "----------------------- ------------- ----------------------- ------- ----------- \n"; item += scanDS.BwareScanTable[0].Scan + " " + scanDS.BwareScanTable[0].TripNumber.PadRight(13, ' ') + " " + scanDS.BwareScanTable[0].Scanned.ToString("MM/dd/yyyy hh:mm:ss tt").PadRight(23, ' ') + " " + scanDS.BwareScanTable[0].Station.PadRight(7, ' ') + " " + scanDS.BwareScanTable[0].Cube.ToString().PadRight(11, ' ') + "\n"; } else { item += "(0 row(s) returned)\n"; } item += "\n"; } catch (Exception ex) { throw new ApplicationException("Unexpected error while searching for scanned item " + scan + ".", ex); } return(item); }
public string FindSortedItem(string labelSeqNum) { //Find a sorted item in the Sorted Items table DataSet ds = new DataSet(); string item = ""; try { ds = this.mMediator.FillDataset(App.USP_SCANFINDINTABLE, App.TBL_SCANFINDINTABLE, new object[] { labelSeqNum }); OutboundFreightDS itemDS = new OutboundFreightDS(); itemDS.Merge(ds); if (itemDS.SortedItemTable.Rows.Count > 0) { item += "SORT_DATE STATION LABEL_SEQ_NUMBER VENDOR_ITEM_NUMBER ScanString \n"; item += "----------------------- ------- ---------------- ------------------------- ------------------------------ \n"; item += itemDS.SortedItemTable[0].SORT_DATE.ToString("MM/dd/yyyy").PadRight(23, ' ') + " " + itemDS.SortedItemTable[0].STATION.PadRight(7, ' ') + " " + itemDS.SortedItemTable[0].LABEL_SEQ_NUMBER.PadRight(16, ' ') + " " + itemDS.SortedItemTable[0].VENDOR_ITEM_NUMBER.PadRight(25, ' ') + " " + itemDS.SortedItemTable[0].ScanString.PadRight(30, ' ') + "\n"; } else { item += "(0 row(s) returned)\n"; } item += "\n"; } catch (Exception ex) { throw new ApplicationException("Unexpected error while searching for sorted item " + labelSeqNum + ".", ex); } return(item); }
public OutboundFreightDS GetScannedItems(string stationNumber, DateTime start, DateTime end) { //Read scanned items OutboundFreightDS scannedItems = null; try { scannedItems = new OutboundFreightDS(); DataSet ds = this.mMediator.FillDataset(App.USP_SCANSGETFORSTATION, App.TBL_SCANSGET, new object[] { stationNumber, start.ToString("yyyy-MM-dd HH:mm:ss"), end.ToString("yyyy-MM-dd HH:mm:ss") }); if (ds != null) { scannedItems.Merge(ds); } } catch (Exception ex) { throw new ApplicationException("Unexpected error while reading sorted items for station# " + stationNumber + ".", ex); } return(scannedItems); }
public SortStation(WorkstationDS.WorkstationDetailTableRow workstation, EnterpriseTerminal terminal) { //Constructor try { //Configure this station from the station configuration information this.mTerminal = terminal; if (workstation != null) { if (!workstation.IsWorkStationIDNull()) { this.mWorkStationID = workstation.WorkStationID; } if (!workstation.IsNameNull()) { this.mName = workstation.Name.Trim(); } if (!workstation.IsTerminalIDNull()) { this.mTerminalID = workstation.TerminalID; } if (!workstation.IsNumberNull()) { this.mNumber = workstation.Number.Trim(); } if (!workstation.IsDescriptionNull()) { this.mDescription = workstation.Description.Trim(); } if (!workstation.IsScaleTypeNull()) { this.mScaleType = workstation.ScaleType.Trim(); } if (!workstation.IsScalePortNull()) { this.mScalePort = workstation.ScalePort.Trim(); } if (!workstation.IsPrinterTypeNull()) { this.mPrinterType = workstation.PrinterType.Trim(); } if (!workstation.IsPrinterPortNull()) { this.mPrinterPort = workstation.PrinterPort.Trim(); } if (!workstation.IsTraceNull()) { this.mTrace = workstation.Trace; } if (!workstation.IsIsActiveNull()) { this.mIsActive = workstation.IsActive; } } this.mZebraPrinter = new ZebraPrinter(this.mPrinterType); this.mLogDS = new ArgixLogDS(); if (ConfigurationManager.AppSettings.Get(this.mName) != null) { this.mTraceSQLConnection = ConfigurationManager.AppSettings.Get(this.mName); } this.mItemDS = new OutboundFreightDS(); } catch (Exception ex) { throw ex; } }