public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs)
            {
                System.Xml.Schema.XmlSchemaComplexType type     = new System.Xml.Schema.XmlSchemaComplexType();
                System.Xml.Schema.XmlSchemaSequence    sequence = new System.Xml.Schema.XmlSchemaSequence();
                WorkstationDS ds = new WorkstationDS();

                xs.Add(ds.GetSchemaSerializable());
                System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny();
                any1.Namespace       = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs       = new decimal(0);
                any1.MaxOccurs       = decimal.MaxValue;
                any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny();
                any2.Namespace       = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs       = new decimal(1);
                any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name       = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name       = "tableTypeName";
                attribute2.FixedValue = "WorkstationDetailTableDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                return(type);
            }
        public override System.Data.DataSet Clone()
        {
            WorkstationDS cln = ((WorkstationDS)(base.Clone()));

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
        public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs)
        {
            WorkstationDS ds = new WorkstationDS();

            System.Xml.Schema.XmlSchemaComplexType type     = new System.Xml.Schema.XmlSchemaComplexType();
            System.Xml.Schema.XmlSchemaSequence    sequence = new System.Xml.Schema.XmlSchemaSequence();
            xs.Add(ds.GetSchemaSerializable());
            System.Xml.Schema.XmlSchemaAny any = new System.Xml.Schema.XmlSchemaAny();
            any.Namespace = ds.Namespace;
            sequence.Items.Add(any);
            type.Particle = sequence;
            return(type);
        }
Exemple #4
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();
                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);
        }
Exemple #5
0
 public static void RefreshSortStations()
 {
     //Load sort stations for this terminal
     try {
         SortStations.Clear();
         WorkstationDS workstations = new WorkstationDS();
         workstations.Merge(Mediator.FillDataset(App.USP_SORTSTATIONS, App.TBL_SORTSTATIONS, null));
         for (int i = 0; i < workstations.WorkstationDetailTable.Rows.Count; i++)
         {
             EnterpriseTerminal terminal = GetTerminal(workstations.WorkstationDetailTable[i].TerminalID);
             SortStation        station  = new SortStation(workstations.WorkstationDetailTable[i], terminal);
             SortStations.Add(station.Number.Trim().PadLeft(3, '0'), station);
         }
     }
     catch (Exception ex) { throw new ApplicationException("Unexpected error while refreshing sort stations.", ex); }
     finally { if (SortStationsChanged != null)
               {
                   SortStationsChanged(null, EventArgs.Empty);
               }
     }
 }