Пример #1
0
 public Workstation(WorkstationDS.WorkstationDetailTableRow workstation)
 {
     //Constructor
     try {
         //Configure this station from the station configuration information
         if (workstation != null)
         {
             if (!workstation.IsWorkStationIDNull())
             {
                 this.mWorkStationID = workstation.WorkStationID;
             }
             if (!workstation.IsNameNull())
             {
                 this.mName = workstation.Name;
             }
             if (!workstation.IsTerminalIDNull())
             {
                 this.mTerminalID = workstation.TerminalID;
             }
             if (!workstation.IsNumberNull())
             {
                 this.mNumber = workstation.Number;
             }
             if (!workstation.IsDescriptionNull())
             {
                 this.mDescription = workstation.Description;
             }
             if (!workstation.IsScaleTypeNull())
             {
                 this.mScaleType = workstation.ScaleType;
             }
             if (!workstation.IsScalePortNull())
             {
                 this.mScalePort = workstation.ScalePort;
             }
             if (!workstation.IsPrinterTypeNull())
             {
                 this.mPrinterType = workstation.PrinterType;
             }
             if (!workstation.IsPrinterPortNull())
             {
                 this.mPrinterPort = workstation.PrinterPort;
             }
             if (!workstation.IsTraceNull())
             {
                 this.mTrace = workstation.Trace;
             }
             if (!workstation.IsIsActiveNull())
             {
                 this.mIsActive = workstation.IsActive;
             }
         }
     }
     catch (Exception ex) { throw new ApplicationException("Could not create a new workstation.", ex); }
 }