Esempio n. 1
0
        public override DataSet ToDataSet()
        {
            //Return a dataset containing values for this workstation
            WorkstationDS ds = null;

            try {
                ds = new WorkstationDS();
                WorkstationDS.WorkstationDetailTableRow workstation = ds.WorkstationDetailTable.NewWorkstationDetailTableRow();
                workstation.WorkStationID = base.mWorkStationID;
                workstation.Name          = base.mName;
                workstation.TerminalID    = base.mTerminalID;
                workstation.Number        = base.mNumber;
                workstation.Description   = base.mDescription;
                if (this.mScale != null)
                {
                    workstation.ScaleType = this.mScale.Type;
                    workstation.ScalePort = this.mScale.Settings.PortName;
                }
                if (this.mLabelPrinter != null)
                {
                    workstation.PrinterType = this.mLabelPrinter.Type;
                    workstation.PrinterPort = this.mLabelPrinter.Settings.PortName;
                }
                workstation.Trace    = base.mTrace;
                workstation.IsActive = base.mIsActive;
                ds.WorkstationDetailTable.AddWorkstationDetailTableRow(workstation);
                ds.AcceptChanges();
            }
            catch (Exception) { }
            return(ds);
        }
Esempio n. 2
0
 public Workstation(WorkstationDS.WorkstationDetailTableRow workstation)
 {
     //Constructor
     try {
         //Configure this station from the station configuration information
         if (workstation != null)
         {
             this.mWorkStationID = workstation.WorkStationID;
             if (!workstation.IsNameNull())
             {
                 this.mName = workstation.Name;
             }
             this.mTerminalID = workstation.TerminalID;
             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;
             }
             this.mIsActive = workstation.IsActive;
         }
         this.mStatistics = new Statistics();
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected error while creating Workstation instance.", ex); }
 }
Esempio n. 3
0
        public DataSet ToDataSet()
        {
            //Return a dataset containing values for this workstation
            WorkstationDS ds = null;

            try {
                ds = new WorkstationDS();
                WorkstationDS.WorkstationDetailTableRow workstation = ds.WorkstationDetailTable.NewWorkstationDetailTableRow();
                workstation.WorkStationID = this.mWorkStationID;
                if (this.mName.Length > 0)
                {
                    workstation.Name = this.mName;
                }
                workstation.TerminalID = this.mTerminalID;
                workstation.Number     = this.mNumber;
                if (this.mDescription.Length > 0)
                {
                    workstation.Description = this.mDescription;
                }
                if (this.mScaleType.Length > 0)
                {
                    workstation.ScaleType = this.mScaleType;
                }
                if (this.mScalePort.Length > 0)
                {
                    workstation.ScalePort = this.mScalePort;
                }
                if (this.mPrinterType.Length > 0)
                {
                    workstation.PrinterType = this.mPrinterType;
                }
                if (this.mPrinterPort.Length > 0)
                {
                    workstation.PrinterPort = this.mPrinterPort;
                }
                workstation.Trace    = this.mTrace;
                workstation.IsActive = this.mIsActive;
                ds.WorkstationDetailTable.AddWorkstationDetailTableRow(workstation);
                ds.AcceptChanges();
            }
            catch (Exception) { }
            return(ds);
        }
Esempio n. 4
0
 public SortStation(WorkstationDS.WorkstationDetailTableRow workstation) : base(workstation)
 {
 }