public override global::System.Data.DataSet Clone() { TerminalDS cln = ((TerminalDS)(base.Clone())); cln.InitVars(); cln.SchemaSerializationMode = this.SchemaSerializationMode; return(cln); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { TerminalDS ds = new TerminalDS(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }
public TerminalDS ToDataSet() { //Return a dataset containing values for this terminal TerminalDS ds = null; try { ds = new TerminalDS(); TerminalDS.LocalTerminalTableRow terminal = ds.LocalTerminalTable.NewLocalTerminalTableRow(); terminal.Description = this.mName; ds.LocalTerminalTable.AddLocalTerminalTableRow(terminal); } catch (Exception) { } return(ds); }
public DataSet GetTerminals() { //Get a list of Argix terminals TerminalDS terminals = null; try { terminals = new TerminalDS(); DataSet ds = FillDataset(USP_TERMINALS, TBL_TERMINALS, new object[] { }); if (ds.Tables[TBL_TERMINALS].Rows.Count > 0) { TerminalDS _terminals = new TerminalDS(); _terminals.Merge(ds); terminals.Merge(_terminals.TerminalTable.Select("", "Description ASC")); } } catch (ApplicationException ex) { throw ex; } catch (Exception ex) { throw new ApplicationException("Unexpected exception creating Argix terminal list.", ex); } return(terminals); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(dlgOpen)); this.btnOK = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.cboTerminal = new System.Windows.Forms.ComboBox(); this.mTerminalDS = new Argix.Enterprise.TerminalDS(); this._lblTerminal = new System.Windows.Forms.Label(); this._lblSDate = new System.Windows.Forms.Label(); this._lblEDate = new System.Windows.Forms.Label(); this.dtpStart = new System.Windows.Forms.DateTimePicker(); this.dtpEnd = new System.Windows.Forms.DateTimePicker(); ((System.ComponentModel.ISupportInitialize)(this.mTerminalDS)).BeginInit(); this.SuspendLayout(); // // btnOK // this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnOK.Location = new System.Drawing.Point(126, 132); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(96, 24); this.btnOK.TabIndex = 0; this.btnOK.Text = "&OK "; // // btnCancel // this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnCancel.Location = new System.Drawing.Point(228, 132); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(96, 24); this.btnCancel.TabIndex = 1; this.btnCancel.Text = "&Cancel"; // // cboTerminal // this.cboTerminal.DataSource = this.mTerminalDS; this.cboTerminal.DisplayMember = "LocalTerminalTable.Description"; this.cboTerminal.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboTerminal.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cboTerminal.Location = new System.Drawing.Point(82, 12); this.cboTerminal.Name = "cboTerminal"; this.cboTerminal.Size = new System.Drawing.Size(240, 21); this.cboTerminal.TabIndex = 3; this.cboTerminal.ValueMember = "LocalTerminalTable.AgentNumber"; this.cboTerminal.SelectionChangeCommitted += new System.EventHandler(this.OnValidateForm); // // mTerminalDS // this.mTerminalDS.DataSetName = "TerminalDS"; this.mTerminalDS.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // // _lblTerminal // this._lblTerminal.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this._lblTerminal.Location = new System.Drawing.Point(6, 12); this._lblTerminal.Name = "_lblTerminal"; this._lblTerminal.Size = new System.Drawing.Size(72, 18); this._lblTerminal.TabIndex = 4; this._lblTerminal.Text = "Terminal"; this._lblTerminal.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // _lblSDate // this._lblSDate.Enabled = false; this._lblSDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this._lblSDate.Location = new System.Drawing.Point(6, 48); this._lblSDate.Name = "_lblSDate"; this._lblSDate.Size = new System.Drawing.Size(72, 19); this._lblSDate.TabIndex = 5; this._lblSDate.Text = "Start Date"; this._lblSDate.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // _lblEDate // this._lblEDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this._lblEDate.Location = new System.Drawing.Point(6, 75); this._lblEDate.Name = "_lblEDate"; this._lblEDate.Size = new System.Drawing.Size(72, 19); this._lblEDate.TabIndex = 6; this._lblEDate.Text = "End Date"; this._lblEDate.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // dtpStart // this.dtpStart.Enabled = false; this.dtpStart.Location = new System.Drawing.Point(82, 48); this.dtpStart.Name = "dtpStart"; this.dtpStart.ShowUpDown = true; this.dtpStart.Size = new System.Drawing.Size(192, 20); this.dtpStart.TabIndex = 7; this.dtpStart.ValueChanged += new System.EventHandler(this.OnStartDateChanged); // // dtpEnd // this.dtpEnd.Location = new System.Drawing.Point(82, 75); this.dtpEnd.MaxDate = new System.DateTime(2108, 12, 31, 0, 0, 0, 0); this.dtpEnd.MinDate = new System.DateTime(1961, 8, 2, 0, 0, 0, 0); this.dtpEnd.Name = "dtpEnd"; this.dtpEnd.ShowUpDown = true; this.dtpEnd.Size = new System.Drawing.Size(192, 20); this.dtpEnd.TabIndex = 8; this.dtpEnd.Value = new System.DateTime(2008, 8, 29, 0, 0, 0, 0); this.dtpEnd.ValueChanged += new System.EventHandler(this.OnEndDateChanged); // // dlgOpen // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(330, 160); this.Controls.Add(this.dtpEnd); this.Controls.Add(this.dtpStart); this.Controls.Add(this._lblEDate); this.Controls.Add(this._lblSDate); this.Controls.Add(this._lblTerminal); this.Controls.Add(this.cboTerminal); this.Controls.Add(this.btnCancel); this.Controls.Add(this.btnOK); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "dlgOpen"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Open Driver Compensation"; this.TopMost = true; this.Load += new System.EventHandler(this.OnFormLoad); ((System.ComponentModel.ISupportInitialize)(this.mTerminalDS)).EndInit(); this.ResumeLayout(false); }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); TerminalDS ds = new TerminalDS(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "TerminalTableDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte()));) { ; } if ((s1.Position == s1.Length)) { return(type); } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return(type); }