Esempio n. 1
0
        public override global::System.Data.DataSet Clone()
        {
            TravelExpertsDataSet cln = ((TravelExpertsDataSet)(base.Clone()));

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
Esempio n. 2
0
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs)
        {
            TravelExpertsDataSet ds = new TravelExpertsDataSet();

            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);
        }
Esempio n. 3
0
            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();
                TravelExpertsDataSet ds = new TravelExpertsDataSet();

                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 = "DataTable1DataTable";
                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);
            }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     this.label9 = new System.Windows.Forms.Label();
     this.txtCommission = new System.Windows.Forms.TextBox();
     this.label8 = new System.Windows.Forms.Label();
     this.txtPrice = new System.Windows.Forms.TextBox();
     this.dtpEnd = new System.Windows.Forms.DateTimePicker();
     this.label7 = new System.Windows.Forms.Label();
     this.dtpStart = new System.Windows.Forms.DateTimePicker();
     this.label6 = new System.Windows.Forms.Label();
     this.label5 = new System.Windows.Forms.Label();
     this.txtDescription = new System.Windows.Forms.TextBox();
     this.label4 = new System.Windows.Forms.Label();
     this.txtName = new System.Windows.Forms.TextBox();
     this.btnSubmit = new System.Windows.Forms.Button();
     this.btnCancel = new System.Windows.Forms.Button();
     this.groupBox1 = new System.Windows.Forms.GroupBox();
     this.groupBox2 = new System.Windows.Forms.GroupBox();
     this.btnRemove = new System.Windows.Forms.Button();
     this.dgvProductSuppliers = new System.Windows.Forms.DataGridView();
     this.ProductSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.ProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.SupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.btnAddToPackage = new System.Windows.Forms.Button();
     this.cbxSuppliers = new System.Windows.Forms.ComboBox();
     this.cbxProductList = new System.Windows.Forms.ComboBox();
     this.label2 = new System.Windows.Forms.Label();
     this.label1 = new System.Windows.Forms.Label();
     this.travelExpertsDataSet = new TravelExperts.TravelExpertsDataSet();
     this.productsSuppliersBindingSource = new System.Windows.Forms.BindingSource(this.components);
     this.products_SuppliersTableAdapter = new TravelExperts.TravelExpertsDataSetTableAdapters.Products_SuppliersTableAdapter();
     this.travelExpertsDataSetBindingSource = new System.Windows.Forms.BindingSource(this.components);
     this.productsBindingSource = new System.Windows.Forms.BindingSource(this.components);
     this.productsTableAdapter = new TravelExperts.TravelExpertsDataSetTableAdapters.ProductsTableAdapter();
     this.menuStrip1 = new System.Windows.Forms.MenuStrip();
     this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.groupBox1.SuspendLayout();
     this.groupBox2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dgvProductSuppliers)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.travelExpertsDataSet)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.productsSuppliersBindingSource)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.travelExpertsDataSetBindingSource)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.productsBindingSource)).BeginInit();
     this.menuStrip1.SuspendLayout();
     this.SuspendLayout();
     //
     // label9
     //
     this.label9.AutoSize = true;
     this.label9.Location = new System.Drawing.Point(19, 202);
     this.label9.Name = "label9";
     this.label9.Size = new System.Drawing.Size(141, 17);
     this.label9.TabIndex = 37;
     this.label9.Text = "Commission(Amount)";
     //
     // txtCommission
     //
     this.txtCommission.Location = new System.Drawing.Point(166, 199);
     this.txtCommission.Name = "txtCommission";
     this.txtCommission.Size = new System.Drawing.Size(273, 22);
     this.txtCommission.TabIndex = 36;
     //
     // label8
     //
     this.label8.AutoSize = true;
     this.label8.Location = new System.Drawing.Point(79, 174);
     this.label8.Name = "label8";
     this.label8.Size = new System.Drawing.Size(76, 17);
     this.label8.TabIndex = 35;
     this.label8.Text = "Price Base";
     //
     // txtPrice
     //
     this.txtPrice.Location = new System.Drawing.Point(166, 171);
     this.txtPrice.Name = "txtPrice";
     this.txtPrice.Size = new System.Drawing.Size(273, 22);
     this.txtPrice.TabIndex = 34;
     //
     // dtpEnd
     //
     this.dtpEnd.Location = new System.Drawing.Point(166, 143);
     this.dtpEnd.Name = "dtpEnd";
     this.dtpEnd.Size = new System.Drawing.Size(273, 22);
     this.dtpEnd.TabIndex = 33;
     //
     // label7
     //
     this.label7.AutoSize = true;
     this.label7.Location = new System.Drawing.Point(91, 148);
     this.label7.Name = "label7";
     this.label7.Size = new System.Drawing.Size(67, 17);
     this.label7.TabIndex = 32;
     this.label7.Text = "End Date";
     //
     // dtpStart
     //
     this.dtpStart.Location = new System.Drawing.Point(166, 115);
     this.dtpStart.Name = "dtpStart";
     this.dtpStart.Size = new System.Drawing.Size(271, 22);
     this.dtpStart.TabIndex = 31;
     this.dtpStart.Value = new System.DateTime(2015, 1, 12, 0, 0, 0, 0);
     //
     // label6
     //
     this.label6.AutoSize = true;
     this.label6.Location = new System.Drawing.Point(86, 120);
     this.label6.Name = "label6";
     this.label6.Size = new System.Drawing.Size(72, 17);
     this.label6.TabIndex = 30;
     this.label6.Text = "Start Date";
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Location = new System.Drawing.Point(79, 51);
     this.label5.Name = "label5";
     this.label5.Size = new System.Drawing.Size(79, 17);
     this.label5.TabIndex = 29;
     this.label5.Text = "Description";
     //
     // txtDescription
     //
     this.txtDescription.Location = new System.Drawing.Point(166, 48);
     this.txtDescription.MaxLength = 250;
     this.txtDescription.Multiline = true;
     this.txtDescription.Name = "txtDescription";
     this.txtDescription.Size = new System.Drawing.Size(382, 61);
     this.txtDescription.TabIndex = 28;
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Location = new System.Drawing.Point(110, 23);
     this.label4.Name = "label4";
     this.label4.Size = new System.Drawing.Size(45, 17);
     this.label4.TabIndex = 27;
     this.label4.Text = "Name";
     //
     // txtName
     //
     this.txtName.Location = new System.Drawing.Point(166, 20);
     this.txtName.MaxLength = 50;
     this.txtName.Name = "txtName";
     this.txtName.Size = new System.Drawing.Size(275, 22);
     this.txtName.TabIndex = 26;
     //
     // btnSubmit
     //
     this.btnSubmit.Location = new System.Drawing.Point(324, 592);
     this.btnSubmit.Name = "btnSubmit";
     this.btnSubmit.Size = new System.Drawing.Size(139, 38);
     this.btnSubmit.TabIndex = 39;
     this.btnSubmit.Text = "Submit";
     this.btnSubmit.UseVisualStyleBackColor = true;
     this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click);
     //
     // btnCancel
     //
     this.btnCancel.Location = new System.Drawing.Point(469, 592);
     this.btnCancel.Name = "btnCancel";
     this.btnCancel.Size = new System.Drawing.Size(139, 38);
     this.btnCancel.TabIndex = 41;
     this.btnCancel.Text = "Cancel";
     this.btnCancel.UseVisualStyleBackColor = true;
     this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.txtDescription);
     this.groupBox1.Controls.Add(this.txtName);
     this.groupBox1.Controls.Add(this.label4);
     this.groupBox1.Controls.Add(this.label5);
     this.groupBox1.Controls.Add(this.label9);
     this.groupBox1.Controls.Add(this.label6);
     this.groupBox1.Controls.Add(this.txtCommission);
     this.groupBox1.Controls.Add(this.dtpStart);
     this.groupBox1.Controls.Add(this.label8);
     this.groupBox1.Controls.Add(this.label7);
     this.groupBox1.Controls.Add(this.txtPrice);
     this.groupBox1.Controls.Add(this.dtpEnd);
     this.groupBox1.Location = new System.Drawing.Point(10, 42);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new System.Drawing.Size(595, 234);
     this.groupBox1.TabIndex = 42;
     this.groupBox1.TabStop = false;
     this.groupBox1.Text = "Package Details";
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.btnRemove);
     this.groupBox2.Controls.Add(this.dgvProductSuppliers);
     this.groupBox2.Controls.Add(this.btnAddToPackage);
     this.groupBox2.Controls.Add(this.cbxSuppliers);
     this.groupBox2.Controls.Add(this.cbxProductList);
     this.groupBox2.Controls.Add(this.label2);
     this.groupBox2.Controls.Add(this.label1);
     this.groupBox2.Location = new System.Drawing.Point(13, 282);
     this.groupBox2.Name = "groupBox2";
     this.groupBox2.Size = new System.Drawing.Size(594, 304);
     this.groupBox2.TabIndex = 43;
     this.groupBox2.TabStop = false;
     this.groupBox2.Text = "Products";
     //
     // btnRemove
     //
     this.btnRemove.Location = new System.Drawing.Point(513, 106);
     this.btnRemove.Name = "btnRemove";
     this.btnRemove.Size = new System.Drawing.Size(75, 25);
     this.btnRemove.TabIndex = 6;
     this.btnRemove.Text = "Remove";
     this.btnRemove.UseVisualStyleBackColor = true;
     this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
     //
     // dgvProductSuppliers
     //
     this.dgvProductSuppliers.AllowUserToAddRows = false;
     this.dgvProductSuppliers.AllowUserToDeleteRows = false;
     this.dgvProductSuppliers.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
     this.dgvProductSuppliers.BackgroundColor = System.Drawing.SystemColors.Control;
     this.dgvProductSuppliers.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.dgvProductSuppliers.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dgvProductSuppliers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.ProductSupplierId,
     this.ProductId,
     this.SupplierId});
     this.dgvProductSuppliers.Location = new System.Drawing.Point(20, 106);
     this.dgvProductSuppliers.Name = "dgvProductSuppliers";
     this.dgvProductSuppliers.ReadOnly = true;
     this.dgvProductSuppliers.RowHeadersVisible = false;
     this.dgvProductSuppliers.RowTemplate.Height = 24;
     this.dgvProductSuppliers.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
     this.dgvProductSuppliers.Size = new System.Drawing.Size(468, 176);
     this.dgvProductSuppliers.TabIndex = 5;
     //
     // ProductSupplierId
     //
     this.ProductSupplierId.HeaderText = "ID";
     this.ProductSupplierId.Name = "ProductSupplierId";
     this.ProductSupplierId.ReadOnly = true;
     this.ProductSupplierId.Width = 46;
     //
     // ProductId
     //
     this.ProductId.HeaderText = "Product";
     this.ProductId.Name = "ProductId";
     this.ProductId.ReadOnly = true;
     this.ProductId.Width = 82;
     //
     // SupplierId
     //
     this.SupplierId.HeaderText = "Supplier";
     this.SupplierId.Name = "SupplierId";
     this.SupplierId.ReadOnly = true;
     this.SupplierId.Width = 85;
     //
     // btnAddToPackage
     //
     this.btnAddToPackage.Location = new System.Drawing.Point(362, 46);
     this.btnAddToPackage.Name = "btnAddToPackage";
     this.btnAddToPackage.Size = new System.Drawing.Size(75, 25);
     this.btnAddToPackage.TabIndex = 4;
     this.btnAddToPackage.Text = "Add";
     this.btnAddToPackage.UseVisualStyleBackColor = true;
     this.btnAddToPackage.Click += new System.EventHandler(this.btnAddToPackage_Click);
     //
     // cbxSuppliers
     //
     this.cbxSuppliers.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cbxSuppliers.FormattingEnabled = true;
     this.cbxSuppliers.Location = new System.Drawing.Point(69, 60);
     this.cbxSuppliers.Name = "cbxSuppliers";
     this.cbxSuppliers.Size = new System.Drawing.Size(266, 24);
     this.cbxSuppliers.TabIndex = 3;
     //
     // cbxProductList
     //
     this.cbxProductList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.cbxProductList.FormattingEnabled = true;
     this.cbxProductList.Location = new System.Drawing.Point(69, 30);
     this.cbxProductList.Name = "cbxProductList";
     this.cbxProductList.Size = new System.Drawing.Size(266, 24);
     this.cbxProductList.TabIndex = 2;
     this.cbxProductList.SelectedIndexChanged += new System.EventHandler(this.cbxProductList_SelectedIndexChanged);
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(3, 63);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(60, 17);
     this.label2.TabIndex = 1;
     this.label2.Text = "Supplier";
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(6, 33);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(57, 17);
     this.label1.TabIndex = 0;
     this.label1.Text = "Product";
     //
     // travelExpertsDataSet
     //
     this.travelExpertsDataSet.DataSetName = "TravelExpertsDataSet";
     this.travelExpertsDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     //
     // productsSuppliersBindingSource
     //
     this.productsSuppliersBindingSource.DataMember = "Products_Suppliers";
     this.productsSuppliersBindingSource.DataSource = this.travelExpertsDataSet;
     //
     // products_SuppliersTableAdapter
     //
     this.products_SuppliersTableAdapter.ClearBeforeFill = true;
     //
     // travelExpertsDataSetBindingSource
     //
     this.travelExpertsDataSetBindingSource.DataSource = this.travelExpertsDataSet;
     this.travelExpertsDataSetBindingSource.Position = 0;
     //
     // productsBindingSource
     //
     this.productsBindingSource.DataMember = "Products";
     this.productsBindingSource.DataSource = this.travelExpertsDataSetBindingSource;
     //
     // productsTableAdapter
     //
     this.productsTableAdapter.ClearBeforeFill = true;
     //
     // menuStrip1
     //
     this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
     this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.fileToolStripMenuItem,
     this.editToolStripMenuItem});
     this.menuStrip1.Location = new System.Drawing.Point(0, 0);
     this.menuStrip1.Name = "menuStrip1";
     this.menuStrip1.Size = new System.Drawing.Size(619, 28);
     this.menuStrip1.TabIndex = 44;
     this.menuStrip1.Text = "menuStrip1";
     //
     // fileToolStripMenuItem
     //
     this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
     this.fileToolStripMenuItem.Size = new System.Drawing.Size(44, 24);
     this.fileToolStripMenuItem.Text = "File";
     //
     // editToolStripMenuItem
     //
     this.editToolStripMenuItem.Name = "editToolStripMenuItem";
     this.editToolStripMenuItem.Size = new System.Drawing.Size(47, 24);
     this.editToolStripMenuItem.Text = "Edit";
     //
     // frmPackage
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.AutoScroll = true;
     this.ClientSize = new System.Drawing.Size(619, 639);
     this.Controls.Add(this.groupBox2);
     this.Controls.Add(this.groupBox1);
     this.Controls.Add(this.btnCancel);
     this.Controls.Add(this.btnSubmit);
     this.Controls.Add(this.menuStrip1);
     this.MainMenuStrip = this.menuStrip1;
     this.Name = "frmPackage";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text = "Packages";
     this.Load += new System.EventHandler(this.frmPackage_Load);
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.groupBox2.ResumeLayout(false);
     this.groupBox2.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.dgvProductSuppliers)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.travelExpertsDataSet)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.productsSuppliersBindingSource)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.travelExpertsDataSetBindingSource)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.productsBindingSource)).EndInit();
     this.menuStrip1.ResumeLayout(false);
     this.menuStrip1.PerformLayout();
     this.ResumeLayout(false);
     this.PerformLayout();
 }