public DataSet ToDataSet() { //Return a dataset containing values for this workstation WorkstationDS ds = null; try { ds = new WorkstationDS(); WorkstationDS.WorkstationDetailTableRow workstation = ds.WorkstationDetailTable.NewWorkstationDetailTableRow(); if (this.mWorkStationID != "") { workstation.WorkStationID = this.mWorkStationID; } if (this.mName != "") { workstation.Name = this.mName; } if (this.mTerminalID > 0) { workstation.TerminalID = this.mTerminalID; } if (this.mNumber != "") { workstation.Number = this.mNumber; } if (this.mDescription != "") { workstation.Description = this.mDescription; } if (this.mScaleType != "") { workstation.ScaleType = this.mScaleType; } if (this.mScalePort != "") { workstation.ScalePort = this.mScalePort; } if (this.mPrinterType != "") { workstation.PrinterType = this.mPrinterType; } if (this.mPrinterPort != "") { workstation.PrinterPort = this.mPrinterPort; } workstation.Trace = this.mTrace; workstation.IsActive = this.mIsActive; ds.WorkstationDetailTable.AddWorkstationDetailTableRow(workstation); } catch (Exception) { } return(ds); }
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; } }