Your Name 7 months ago
parent
commit
28810426d3

+ 265 - 264
СУБД Альфапол/FormAddEdit.Designer.cs

@@ -51,29 +51,29 @@
             this.dbAlphapolAGDataSet = new СУБД_Альфапол.dbAlphapolAGDataSet();
             this.dbAlphapolAGDataSet = new СУБД_Альфапол.dbAlphapolAGDataSet();
             this.partnerTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.PartnerTableAdapter();
             this.partnerTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.PartnerTableAdapter();
             this.tableAdapterManager = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.TableAdapterManager();
             this.tableAdapterManager = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.TableAdapterManager();
-            this.namePartnerTextBox = new System.Windows.Forms.TextBox();
-            this.surnameTextBox = new System.Windows.Forms.TextBox();
-            this.nameTextBox = new System.Windows.Forms.TextBox();
-            this.patronymicTextBox = new System.Windows.Forms.TextBox();
-            this.phoneTextBox = new System.Windows.Forms.TextBox();
-            this.ratingTextBox = new System.Windows.Forms.TextBox();
-            this.houseTextBox = new System.Windows.Forms.TextBox();
-            this.emailTextBox = new System.Windows.Forms.TextBox();
+            this.cityTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.CityTableAdapter();
+            this.indexPartnerTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.IndexPartnerTableAdapter();
+            this.regionTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.RegionTableAdapter();
+            this.streetTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.StreetTableAdapter();
+            this.typePartnerTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.TypePartnerTableAdapter();
+            this.tbxNamePartner = new System.Windows.Forms.TextBox();
+            this.tbxSurname = new System.Windows.Forms.TextBox();
+            this.tbxName = new System.Windows.Forms.TextBox();
+            this.tbxPatronymic = new System.Windows.Forms.TextBox();
+            this.tbxPhone = new System.Windows.Forms.TextBox();
+            this.tbxRating = new System.Windows.Forms.TextBox();
+            this.tbxHouse = new System.Windows.Forms.TextBox();
+            this.tbxEmail = new System.Windows.Forms.TextBox();
             this.cbxTypePartner = new System.Windows.Forms.ComboBox();
             this.cbxTypePartner = new System.Windows.Forms.ComboBox();
             this.bsTypePartner = new System.Windows.Forms.BindingSource(this.components);
             this.bsTypePartner = new System.Windows.Forms.BindingSource(this.components);
-            this.typePartnerTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.TypePartnerTableAdapter();
-            this.comboBox1 = new System.Windows.Forms.ComboBox();
-            this.comboBox2 = new System.Windows.Forms.ComboBox();
-            this.comboBox3 = new System.Windows.Forms.ComboBox();
-            this.comboBox4 = new System.Windows.Forms.ComboBox();
-            this.bsRegion = new System.Windows.Forms.BindingSource(this.components);
-            this.bsCity = new System.Windows.Forms.BindingSource(this.components);
+            this.cbxIndex = new System.Windows.Forms.ComboBox();
             this.bsIndex = new System.Windows.Forms.BindingSource(this.components);
             this.bsIndex = new System.Windows.Forms.BindingSource(this.components);
+            this.cbxCity = new System.Windows.Forms.ComboBox();
+            this.bsCity = new System.Windows.Forms.BindingSource(this.components);
+            this.cbxRegion = new System.Windows.Forms.ComboBox();
+            this.bsRegion = new System.Windows.Forms.BindingSource(this.components);
+            this.cbxStreet = new System.Windows.Forms.ComboBox();
             this.bsStreet = new System.Windows.Forms.BindingSource(this.components);
             this.bsStreet = new System.Windows.Forms.BindingSource(this.components);
-            this.regionTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.RegionTableAdapter();
-            this.cityTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.CityTableAdapter();
-            this.indexPartnerTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.IndexPartnerTableAdapter();
-            this.streetTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.StreetTableAdapter();
             this.btnSave = new System.Windows.Forms.Button();
             this.btnSave = new System.Windows.Forms.Button();
             this.btnCancel = new System.Windows.Forms.Button();
             this.btnCancel = new System.Windows.Forms.Button();
             namePartnerLabel = new System.Windows.Forms.Label();
             namePartnerLabel = new System.Windows.Forms.Label();
@@ -95,77 +95,12 @@
             ((System.ComponentModel.ISupportInitialize)(this.bsPartner)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsPartner)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dbAlphapolAGDataSet)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dbAlphapolAGDataSet)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsTypePartner)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsTypePartner)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.bsRegion)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.bsCity)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsIndex)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsIndex)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.bsCity)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.bsRegion)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsStreet)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsStreet)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
-            // panel1
-            // 
-            this.panel1.BackColor = System.Drawing.Color.LightGray;
-            this.panel1.Controls.Add(this.lblTitle);
-            this.panel1.Controls.Add(this.pictureBox1);
-            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
-            this.panel1.Location = new System.Drawing.Point(0, 0);
-            this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(870, 133);
-            this.panel1.TabIndex = 1;
-            // 
-            // lblTitle
-            // 
-            this.lblTitle.AutoSize = true;
-            this.lblTitle.Font = new System.Drawing.Font("Courier New", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
-            this.lblTitle.Location = new System.Drawing.Point(275, 39);
-            this.lblTitle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.lblTitle.Name = "lblTitle";
-            this.lblTitle.Size = new System.Drawing.Size(436, 41);
-            this.lblTitle.TabIndex = 1;
-            this.lblTitle.Text = "Добавление партнера";
-            // 
-            // pictureBox1
-            // 
-            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
-            this.pictureBox1.Image = global::СУБД_Альфапол.Properties.Resources.Альфапол;
-            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(165, 133);
-            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
-            this.pictureBox1.TabIndex = 0;
-            this.pictureBox1.TabStop = false;
-            // 
-            // bsPartner
-            // 
-            this.bsPartner.DataMember = "Partner";
-            this.bsPartner.DataSource = this.dbAlphapolAGDataSet;
-            // 
-            // dbAlphapolAGDataSet
-            // 
-            this.dbAlphapolAGDataSet.DataSetName = "dbAlphapolAGDataSet";
-            this.dbAlphapolAGDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
-            // 
-            // partnerTableAdapter
-            // 
-            this.partnerTableAdapter.ClearBeforeFill = true;
-            // 
-            // tableAdapterManager
-            // 
-            this.tableAdapterManager.BackupDataSetBeforeUpdate = false;
-            this.tableAdapterManager.CityTableAdapter = this.cityTableAdapter;
-            this.tableAdapterManager.IndexPartnerTableAdapter = this.indexPartnerTableAdapter;
-            this.tableAdapterManager.ManagerTableAdapter = null;
-            this.tableAdapterManager.PartnerTableAdapter = this.partnerTableAdapter;
-            this.tableAdapterManager.ProductPartnerTableAdapter = null;
-            this.tableAdapterManager.ProductsTableAdapter = null;
-            this.tableAdapterManager.RegionTableAdapter = this.regionTableAdapter;
-            this.tableAdapterManager.StreetTableAdapter = this.streetTableAdapter;
-            this.tableAdapterManager.TypeMaterialTableAdapter = null;
-            this.tableAdapterManager.TypePartnerTableAdapter = this.typePartnerTableAdapter;
-            this.tableAdapterManager.TypeProductTableAdapter = null;
-            this.tableAdapterManager.UpdateOrder = СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete;
-            // 
             // namePartnerLabel
             // namePartnerLabel
             // 
             // 
             namePartnerLabel.AutoSize = true;
             namePartnerLabel.AutoSize = true;
@@ -175,14 +110,6 @@
             namePartnerLabel.TabIndex = 1;
             namePartnerLabel.TabIndex = 1;
             namePartnerLabel.Text = "Наименование:";
             namePartnerLabel.Text = "Наименование:";
             // 
             // 
-            // namePartnerTextBox
-            // 
-            this.namePartnerTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "NamePartner", true));
-            this.namePartnerTextBox.Location = new System.Drawing.Point(157, 180);
-            this.namePartnerTextBox.Name = "namePartnerTextBox";
-            this.namePartnerTextBox.Size = new System.Drawing.Size(143, 22);
-            this.namePartnerTextBox.TabIndex = 2;
-            // 
             // surnameLabel
             // surnameLabel
             // 
             // 
             surnameLabel.AutoSize = true;
             surnameLabel.AutoSize = true;
@@ -192,14 +119,6 @@
             surnameLabel.TabIndex = 3;
             surnameLabel.TabIndex = 3;
             surnameLabel.Text = "Фамилия:";
             surnameLabel.Text = "Фамилия:";
             // 
             // 
-            // surnameTextBox
-            // 
-            this.surnameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Surname", true));
-            this.surnameTextBox.Location = new System.Drawing.Point(511, 180);
-            this.surnameTextBox.Name = "surnameTextBox";
-            this.surnameTextBox.Size = new System.Drawing.Size(200, 22);
-            this.surnameTextBox.TabIndex = 4;
-            // 
             // nameLabel
             // nameLabel
             // 
             // 
             nameLabel.AutoSize = true;
             nameLabel.AutoSize = true;
@@ -209,14 +128,6 @@
             nameLabel.TabIndex = 5;
             nameLabel.TabIndex = 5;
             nameLabel.Text = "Имя:";
             nameLabel.Text = "Имя:";
             // 
             // 
-            // nameTextBox
-            // 
-            this.nameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Name", true));
-            this.nameTextBox.Location = new System.Drawing.Point(511, 208);
-            this.nameTextBox.Name = "nameTextBox";
-            this.nameTextBox.Size = new System.Drawing.Size(200, 22);
-            this.nameTextBox.TabIndex = 6;
-            // 
             // patronymicLabel
             // patronymicLabel
             // 
             // 
             patronymicLabel.AutoSize = true;
             patronymicLabel.AutoSize = true;
@@ -226,14 +137,6 @@
             patronymicLabel.TabIndex = 7;
             patronymicLabel.TabIndex = 7;
             patronymicLabel.Text = "Отчество:";
             patronymicLabel.Text = "Отчество:";
             // 
             // 
-            // patronymicTextBox
-            // 
-            this.patronymicTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Patronymic", true));
-            this.patronymicTextBox.Location = new System.Drawing.Point(511, 237);
-            this.patronymicTextBox.Name = "patronymicTextBox";
-            this.patronymicTextBox.Size = new System.Drawing.Size(200, 22);
-            this.patronymicTextBox.TabIndex = 8;
-            // 
             // phoneLabel
             // phoneLabel
             // 
             // 
             phoneLabel.AutoSize = true;
             phoneLabel.AutoSize = true;
@@ -243,14 +146,6 @@
             phoneLabel.TabIndex = 9;
             phoneLabel.TabIndex = 9;
             phoneLabel.Text = "Телефон:";
             phoneLabel.Text = "Телефон:";
             // 
             // 
-            // phoneTextBox
-            // 
-            this.phoneTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Phone", true));
-            this.phoneTextBox.Location = new System.Drawing.Point(511, 281);
-            this.phoneTextBox.Name = "phoneTextBox";
-            this.phoneTextBox.Size = new System.Drawing.Size(200, 22);
-            this.phoneTextBox.TabIndex = 10;
-            // 
             // ratingLabel
             // ratingLabel
             // 
             // 
             ratingLabel.AutoSize = true;
             ratingLabel.AutoSize = true;
@@ -260,14 +155,6 @@
             ratingLabel.TabIndex = 11;
             ratingLabel.TabIndex = 11;
             ratingLabel.Text = "Рейтинг:";
             ratingLabel.Text = "Рейтинг:";
             // 
             // 
-            // ratingTextBox
-            // 
-            this.ratingTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Rating", true));
-            this.ratingTextBox.Location = new System.Drawing.Point(157, 368);
-            this.ratingTextBox.Name = "ratingTextBox";
-            this.ratingTextBox.Size = new System.Drawing.Size(143, 22);
-            this.ratingTextBox.TabIndex = 12;
-            // 
             // houseLabel
             // houseLabel
             // 
             // 
             houseLabel.AutoSize = true;
             houseLabel.AutoSize = true;
@@ -277,14 +164,6 @@
             houseLabel.TabIndex = 13;
             houseLabel.TabIndex = 13;
             houseLabel.Text = "Дом/квартира:";
             houseLabel.Text = "Дом/квартира:";
             // 
             // 
-            // houseTextBox
-            // 
-            this.houseTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "House", true));
-            this.houseTextBox.Location = new System.Drawing.Point(155, 413);
-            this.houseTextBox.Name = "houseTextBox";
-            this.houseTextBox.Size = new System.Drawing.Size(143, 22);
-            this.houseTextBox.TabIndex = 14;
-            // 
             // emailLabel
             // emailLabel
             // 
             // 
             emailLabel.AutoSize = true;
             emailLabel.AutoSize = true;
@@ -294,14 +173,6 @@
             emailLabel.TabIndex = 15;
             emailLabel.TabIndex = 15;
             emailLabel.Text = "Email:";
             emailLabel.Text = "Email:";
             // 
             // 
-            // emailTextBox
-            // 
-            this.emailTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Email", true));
-            this.emailTextBox.Location = new System.Drawing.Point(511, 309);
-            this.emailTextBox.Name = "emailTextBox";
-            this.emailTextBox.Size = new System.Drawing.Size(200, 22);
-            this.emailTextBox.TabIndex = 16;
-            // 
             // label1
             // label1
             // 
             // 
             label1.AutoSize = true;
             label1.AutoSize = true;
@@ -320,28 +191,6 @@
             label2.TabIndex = 18;
             label2.TabIndex = 18;
             label2.Text = "Тип:";
             label2.Text = "Тип:";
             // 
             // 
-            // cbxTypePartner
-            // 
-            this.cbxTypePartner.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsPartner, "idTypePartner", true));
-            this.cbxTypePartner.DataSource = this.bsTypePartner;
-            this.cbxTypePartner.DisplayMember = "Type";
-            this.cbxTypePartner.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cbxTypePartner.FormattingEnabled = true;
-            this.cbxTypePartner.Location = new System.Drawing.Point(157, 211);
-            this.cbxTypePartner.Name = "cbxTypePartner";
-            this.cbxTypePartner.Size = new System.Drawing.Size(202, 24);
-            this.cbxTypePartner.TabIndex = 19;
-            this.cbxTypePartner.ValueMember = "idTypePartner";
-            // 
-            // bsTypePartner
-            // 
-            this.bsTypePartner.DataMember = "TypePartner";
-            this.bsTypePartner.DataSource = this.dbAlphapolAGDataSet;
-            // 
-            // typePartnerTableAdapter
-            // 
-            this.typePartnerTableAdapter.ClearBeforeFill = true;
-            // 
             // label3
             // label3
             // 
             // 
             label3.AutoSize = true;
             label3.AutoSize = true;
@@ -378,81 +227,70 @@
             label6.TabIndex = 23;
             label6.TabIndex = 23;
             label6.Text = "Улица:";
             label6.Text = "Улица:";
             // 
             // 
-            // comboBox1
-            // 
-            this.comboBox1.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsPartner, "idIndex", true));
-            this.comboBox1.DataSource = this.bsIndex;
-            this.comboBox1.DisplayMember = "CodePartner";
-            this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.comboBox1.FormattingEnabled = true;
-            this.comboBox1.Location = new System.Drawing.Point(155, 298);
-            this.comboBox1.Name = "comboBox1";
-            this.comboBox1.Size = new System.Drawing.Size(202, 24);
-            this.comboBox1.TabIndex = 24;
-            this.comboBox1.ValueMember = "idIndex";
-            // 
-            // comboBox2
-            // 
-            this.comboBox2.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsPartner, "idCity", true));
-            this.comboBox2.DataSource = this.bsCity;
-            this.comboBox2.DisplayMember = "City";
-            this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.comboBox2.FormattingEnabled = true;
-            this.comboBox2.Location = new System.Drawing.Point(155, 268);
-            this.comboBox2.Name = "comboBox2";
-            this.comboBox2.Size = new System.Drawing.Size(202, 24);
-            this.comboBox2.TabIndex = 25;
-            this.comboBox2.ValueMember = "idCity";
-            // 
-            // comboBox3
-            // 
-            this.comboBox3.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsPartner, "idRegion", true));
-            this.comboBox3.DataSource = this.bsRegion;
-            this.comboBox3.DisplayMember = "Region";
-            this.comboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.comboBox3.FormattingEnabled = true;
-            this.comboBox3.Location = new System.Drawing.Point(157, 240);
-            this.comboBox3.Name = "comboBox3";
-            this.comboBox3.Size = new System.Drawing.Size(202, 24);
-            this.comboBox3.TabIndex = 26;
-            this.comboBox3.ValueMember = "idRegion";
-            // 
-            // comboBox4
-            // 
-            this.comboBox4.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsPartner, "idStreet", true));
-            this.comboBox4.DataSource = this.bsStreet;
-            this.comboBox4.DisplayMember = "Street";
-            this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.comboBox4.FormattingEnabled = true;
-            this.comboBox4.Location = new System.Drawing.Point(155, 328);
-            this.comboBox4.Name = "comboBox4";
-            this.comboBox4.Size = new System.Drawing.Size(202, 24);
-            this.comboBox4.TabIndex = 27;
-            this.comboBox4.ValueMember = "idStreet";
+            // panel1
             // 
             // 
-            // bsRegion
+            this.panel1.BackColor = System.Drawing.Color.LightGray;
+            this.panel1.Controls.Add(this.lblTitle);
+            this.panel1.Controls.Add(this.pictureBox1);
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Margin = new System.Windows.Forms.Padding(4);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(870, 133);
+            this.panel1.TabIndex = 1;
             // 
             // 
-            this.bsRegion.DataMember = "Region";
-            this.bsRegion.DataSource = this.dbAlphapolAGDataSet;
+            // lblTitle
             // 
             // 
-            // bsCity
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Courier New", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.lblTitle.Location = new System.Drawing.Point(275, 39);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(436, 41);
+            this.lblTitle.TabIndex = 1;
+            this.lblTitle.Text = "Добавление партнера";
             // 
             // 
-            this.bsCity.DataMember = "City";
-            this.bsCity.DataSource = this.dbAlphapolAGDataSet;
+            // pictureBox1
             // 
             // 
-            // bsIndex
+            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
+            this.pictureBox1.Image = global::СУБД_Альфапол.Properties.Resources.Альфапол;
+            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(165, 133);
+            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox1.TabIndex = 0;
+            this.pictureBox1.TabStop = false;
             // 
             // 
-            this.bsIndex.DataMember = "IndexPartner";
-            this.bsIndex.DataSource = this.dbAlphapolAGDataSet;
+            // bsPartner
             // 
             // 
-            // bsStreet
+            this.bsPartner.DataMember = "Partner";
+            this.bsPartner.DataSource = this.dbAlphapolAGDataSet;
             // 
             // 
-            this.bsStreet.DataMember = "Street";
-            this.bsStreet.DataSource = this.dbAlphapolAGDataSet;
+            // dbAlphapolAGDataSet
             // 
             // 
-            // regionTableAdapter
+            this.dbAlphapolAGDataSet.DataSetName = "dbAlphapolAGDataSet";
+            this.dbAlphapolAGDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
             // 
             // 
-            this.regionTableAdapter.ClearBeforeFill = true;
+            // partnerTableAdapter
+            // 
+            this.partnerTableAdapter.ClearBeforeFill = true;
+            // 
+            // tableAdapterManager
+            // 
+            this.tableAdapterManager.BackupDataSetBeforeUpdate = false;
+            this.tableAdapterManager.CityTableAdapter = this.cityTableAdapter;
+            this.tableAdapterManager.IndexPartnerTableAdapter = this.indexPartnerTableAdapter;
+            this.tableAdapterManager.ManagerTableAdapter = null;
+            this.tableAdapterManager.PartnerTableAdapter = this.partnerTableAdapter;
+            this.tableAdapterManager.ProductPartnerTableAdapter = null;
+            this.tableAdapterManager.ProductsTableAdapter = null;
+            this.tableAdapterManager.RegionTableAdapter = this.regionTableAdapter;
+            this.tableAdapterManager.StreetTableAdapter = this.streetTableAdapter;
+            this.tableAdapterManager.TypeMaterialTableAdapter = null;
+            this.tableAdapterManager.TypePartnerTableAdapter = this.typePartnerTableAdapter;
+            this.tableAdapterManager.TypeProductTableAdapter = null;
+            this.tableAdapterManager.UpdateOrder = СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete;
             // 
             // 
             // cityTableAdapter
             // cityTableAdapter
             // 
             // 
@@ -462,10 +300,173 @@
             // 
             // 
             this.indexPartnerTableAdapter.ClearBeforeFill = true;
             this.indexPartnerTableAdapter.ClearBeforeFill = true;
             // 
             // 
+            // regionTableAdapter
+            // 
+            this.regionTableAdapter.ClearBeforeFill = true;
+            // 
             // streetTableAdapter
             // streetTableAdapter
             // 
             // 
             this.streetTableAdapter.ClearBeforeFill = true;
             this.streetTableAdapter.ClearBeforeFill = true;
             // 
             // 
+            // typePartnerTableAdapter
+            // 
+            this.typePartnerTableAdapter.ClearBeforeFill = true;
+            // 
+            // tbxNamePartner
+            // 
+            this.tbxNamePartner.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "NamePartner", true));
+            this.tbxNamePartner.Location = new System.Drawing.Point(157, 180);
+            this.tbxNamePartner.Name = "tbxNamePartner";
+            this.tbxNamePartner.Size = new System.Drawing.Size(143, 22);
+            this.tbxNamePartner.TabIndex = 2;
+            // 
+            // tbxSurname
+            // 
+            this.tbxSurname.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Surname", true));
+            this.tbxSurname.Location = new System.Drawing.Point(511, 180);
+            this.tbxSurname.Name = "tbxSurname";
+            this.tbxSurname.Size = new System.Drawing.Size(200, 22);
+            this.tbxSurname.TabIndex = 4;
+            // 
+            // tbxName
+            // 
+            this.tbxName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Name", true));
+            this.tbxName.Location = new System.Drawing.Point(511, 208);
+            this.tbxName.Name = "tbxName";
+            this.tbxName.Size = new System.Drawing.Size(200, 22);
+            this.tbxName.TabIndex = 6;
+            // 
+            // tbxPatronymic
+            // 
+            this.tbxPatronymic.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Patronymic", true));
+            this.tbxPatronymic.Location = new System.Drawing.Point(511, 237);
+            this.tbxPatronymic.Name = "tbxPatronymic";
+            this.tbxPatronymic.Size = new System.Drawing.Size(200, 22);
+            this.tbxPatronymic.TabIndex = 8;
+            // 
+            // tbxPhone
+            // 
+            this.tbxPhone.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Phone", true));
+            this.tbxPhone.Location = new System.Drawing.Point(511, 281);
+            this.tbxPhone.Name = "tbxPhone";
+            this.tbxPhone.Size = new System.Drawing.Size(200, 22);
+            this.tbxPhone.TabIndex = 10;
+            // 
+            // tbxRating
+            // 
+            this.tbxRating.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Rating", true));
+            this.tbxRating.Location = new System.Drawing.Point(157, 368);
+            this.tbxRating.Name = "tbxRating";
+            this.tbxRating.Size = new System.Drawing.Size(143, 22);
+            this.tbxRating.TabIndex = 12;
+            this.tbxRating.Validating += new System.ComponentModel.CancelEventHandler(this.tbxRating_Validating);
+            // 
+            // tbxHouse
+            // 
+            this.tbxHouse.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "House", true));
+            this.tbxHouse.Location = new System.Drawing.Point(155, 413);
+            this.tbxHouse.Name = "tbxHouse";
+            this.tbxHouse.Size = new System.Drawing.Size(143, 22);
+            this.tbxHouse.TabIndex = 14;
+            // 
+            // tbxEmail
+            // 
+            this.tbxEmail.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsPartner, "Email", true));
+            this.tbxEmail.Location = new System.Drawing.Point(511, 309);
+            this.tbxEmail.Name = "tbxEmail";
+            this.tbxEmail.Size = new System.Drawing.Size(200, 22);
+            this.tbxEmail.TabIndex = 16;
+            // 
+            // cbxTypePartner
+            // 
+            this.cbxTypePartner.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsPartner, "idTypePartner", true));
+            this.cbxTypePartner.DataSource = this.bsTypePartner;
+            this.cbxTypePartner.DisplayMember = "Type";
+            this.cbxTypePartner.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cbxTypePartner.FormattingEnabled = true;
+            this.cbxTypePartner.Location = new System.Drawing.Point(157, 211);
+            this.cbxTypePartner.Name = "cbxTypePartner";
+            this.cbxTypePartner.Size = new System.Drawing.Size(202, 24);
+            this.cbxTypePartner.TabIndex = 19;
+            this.cbxTypePartner.ValueMember = "idTypePartner";
+            // 
+            // bsTypePartner
+            // 
+            this.bsTypePartner.DataMember = "TypePartner";
+            this.bsTypePartner.DataSource = this.dbAlphapolAGDataSet;
+            // 
+            // cbxIndex
+            // 
+            this.cbxIndex.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsPartner, "idIndex", true));
+            this.cbxIndex.DataSource = this.bsIndex;
+            this.cbxIndex.DisplayMember = "CodePartner";
+            this.cbxIndex.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cbxIndex.FormattingEnabled = true;
+            this.cbxIndex.Location = new System.Drawing.Point(155, 298);
+            this.cbxIndex.Name = "cbxIndex";
+            this.cbxIndex.Size = new System.Drawing.Size(202, 24);
+            this.cbxIndex.TabIndex = 24;
+            this.cbxIndex.ValueMember = "idIndex";
+            // 
+            // bsIndex
+            // 
+            this.bsIndex.DataMember = "IndexPartner";
+            this.bsIndex.DataSource = this.dbAlphapolAGDataSet;
+            // 
+            // cbxCity
+            // 
+            this.cbxCity.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsPartner, "idCity", true));
+            this.cbxCity.DataSource = this.bsCity;
+            this.cbxCity.DisplayMember = "City";
+            this.cbxCity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cbxCity.FormattingEnabled = true;
+            this.cbxCity.Location = new System.Drawing.Point(155, 268);
+            this.cbxCity.Name = "cbxCity";
+            this.cbxCity.Size = new System.Drawing.Size(202, 24);
+            this.cbxCity.TabIndex = 25;
+            this.cbxCity.ValueMember = "idCity";
+            // 
+            // bsCity
+            // 
+            this.bsCity.DataMember = "City";
+            this.bsCity.DataSource = this.dbAlphapolAGDataSet;
+            // 
+            // cbxRegion
+            // 
+            this.cbxRegion.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsPartner, "idRegion", true));
+            this.cbxRegion.DataSource = this.bsRegion;
+            this.cbxRegion.DisplayMember = "Region";
+            this.cbxRegion.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cbxRegion.FormattingEnabled = true;
+            this.cbxRegion.Location = new System.Drawing.Point(157, 240);
+            this.cbxRegion.Name = "cbxRegion";
+            this.cbxRegion.Size = new System.Drawing.Size(202, 24);
+            this.cbxRegion.TabIndex = 26;
+            this.cbxRegion.ValueMember = "idRegion";
+            // 
+            // bsRegion
+            // 
+            this.bsRegion.DataMember = "Region";
+            this.bsRegion.DataSource = this.dbAlphapolAGDataSet;
+            // 
+            // cbxStreet
+            // 
+            this.cbxStreet.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.bsPartner, "idStreet", true));
+            this.cbxStreet.DataSource = this.bsStreet;
+            this.cbxStreet.DisplayMember = "Street";
+            this.cbxStreet.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cbxStreet.FormattingEnabled = true;
+            this.cbxStreet.Location = new System.Drawing.Point(155, 328);
+            this.cbxStreet.Name = "cbxStreet";
+            this.cbxStreet.Size = new System.Drawing.Size(202, 24);
+            this.cbxStreet.TabIndex = 27;
+            this.cbxStreet.ValueMember = "idStreet";
+            // 
+            // bsStreet
+            // 
+            this.bsStreet.DataMember = "Street";
+            this.bsStreet.DataSource = this.dbAlphapolAGDataSet;
+            // 
             // btnSave
             // btnSave
             // 
             // 
             this.btnSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(161)))), ((int)(((byte)(99)))), ((int)(((byte)(245)))));
             this.btnSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(161)))), ((int)(((byte)(99)))), ((int)(((byte)(245)))));
@@ -498,10 +499,10 @@
             this.ClientSize = new System.Drawing.Size(870, 554);
             this.ClientSize = new System.Drawing.Size(870, 554);
             this.Controls.Add(this.btnCancel);
             this.Controls.Add(this.btnCancel);
             this.Controls.Add(this.btnSave);
             this.Controls.Add(this.btnSave);
-            this.Controls.Add(this.comboBox4);
-            this.Controls.Add(this.comboBox3);
-            this.Controls.Add(this.comboBox2);
-            this.Controls.Add(this.comboBox1);
+            this.Controls.Add(this.cbxStreet);
+            this.Controls.Add(this.cbxRegion);
+            this.Controls.Add(this.cbxCity);
+            this.Controls.Add(this.cbxIndex);
             this.Controls.Add(label6);
             this.Controls.Add(label6);
             this.Controls.Add(label5);
             this.Controls.Add(label5);
             this.Controls.Add(label4);
             this.Controls.Add(label4);
@@ -510,27 +511,27 @@
             this.Controls.Add(label2);
             this.Controls.Add(label2);
             this.Controls.Add(label1);
             this.Controls.Add(label1);
             this.Controls.Add(emailLabel);
             this.Controls.Add(emailLabel);
-            this.Controls.Add(this.emailTextBox);
+            this.Controls.Add(this.tbxEmail);
             this.Controls.Add(houseLabel);
             this.Controls.Add(houseLabel);
-            this.Controls.Add(this.houseTextBox);
+            this.Controls.Add(this.tbxHouse);
             this.Controls.Add(ratingLabel);
             this.Controls.Add(ratingLabel);
-            this.Controls.Add(this.ratingTextBox);
+            this.Controls.Add(this.tbxRating);
             this.Controls.Add(phoneLabel);
             this.Controls.Add(phoneLabel);
-            this.Controls.Add(this.phoneTextBox);
+            this.Controls.Add(this.tbxPhone);
             this.Controls.Add(patronymicLabel);
             this.Controls.Add(patronymicLabel);
-            this.Controls.Add(this.patronymicTextBox);
+            this.Controls.Add(this.tbxPatronymic);
             this.Controls.Add(nameLabel);
             this.Controls.Add(nameLabel);
-            this.Controls.Add(this.nameTextBox);
+            this.Controls.Add(this.tbxName);
             this.Controls.Add(surnameLabel);
             this.Controls.Add(surnameLabel);
-            this.Controls.Add(this.surnameTextBox);
+            this.Controls.Add(this.tbxSurname);
             this.Controls.Add(namePartnerLabel);
             this.Controls.Add(namePartnerLabel);
-            this.Controls.Add(this.namePartnerTextBox);
+            this.Controls.Add(this.tbxNamePartner);
             this.Controls.Add(this.panel1);
             this.Controls.Add(this.panel1);
             this.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsTypePartner, "Type", true));
             this.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bsTypePartner, "Type", true));
             this.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
             this.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.MaximizeBox = false;
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.MinimizeBox = false;
             this.Name = "FormAddEdit";
             this.Name = "FormAddEdit";
@@ -543,9 +544,9 @@
             ((System.ComponentModel.ISupportInitialize)(this.bsPartner)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsPartner)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dbAlphapolAGDataSet)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dbAlphapolAGDataSet)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsTypePartner)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsTypePartner)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.bsRegion)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.bsCity)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsIndex)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsIndex)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.bsCity)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.bsRegion)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsStreet)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsStreet)).EndInit();
             this.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();
@@ -559,22 +560,22 @@
         private dbAlphapolAGDataSet dbAlphapolAGDataSet;
         private dbAlphapolAGDataSet dbAlphapolAGDataSet;
         private dbAlphapolAGDataSetTableAdapters.PartnerTableAdapter partnerTableAdapter;
         private dbAlphapolAGDataSetTableAdapters.PartnerTableAdapter partnerTableAdapter;
         private dbAlphapolAGDataSetTableAdapters.TableAdapterManager tableAdapterManager;
         private dbAlphapolAGDataSetTableAdapters.TableAdapterManager tableAdapterManager;
-        private System.Windows.Forms.TextBox namePartnerTextBox;
-        private System.Windows.Forms.TextBox surnameTextBox;
-        private System.Windows.Forms.TextBox nameTextBox;
-        private System.Windows.Forms.TextBox patronymicTextBox;
-        private System.Windows.Forms.TextBox phoneTextBox;
-        private System.Windows.Forms.TextBox ratingTextBox;
-        private System.Windows.Forms.TextBox houseTextBox;
-        private System.Windows.Forms.TextBox emailTextBox;
+        private System.Windows.Forms.TextBox tbxNamePartner;
+        private System.Windows.Forms.TextBox tbxSurname;
+        private System.Windows.Forms.TextBox tbxName;
+        private System.Windows.Forms.TextBox tbxPatronymic;
+        private System.Windows.Forms.TextBox tbxPhone;
+        private System.Windows.Forms.TextBox tbxRating;
+        private System.Windows.Forms.TextBox tbxHouse;
+        private System.Windows.Forms.TextBox tbxEmail;
         private System.Windows.Forms.ComboBox cbxTypePartner;
         private System.Windows.Forms.ComboBox cbxTypePartner;
         private dbAlphapolAGDataSetTableAdapters.TypePartnerTableAdapter typePartnerTableAdapter;
         private dbAlphapolAGDataSetTableAdapters.TypePartnerTableAdapter typePartnerTableAdapter;
         private System.Windows.Forms.BindingSource bsTypePartner;
         private System.Windows.Forms.BindingSource bsTypePartner;
         private dbAlphapolAGDataSetTableAdapters.RegionTableAdapter regionTableAdapter;
         private dbAlphapolAGDataSetTableAdapters.RegionTableAdapter regionTableAdapter;
-        private System.Windows.Forms.ComboBox comboBox1;
-        private System.Windows.Forms.ComboBox comboBox2;
-        private System.Windows.Forms.ComboBox comboBox3;
-        private System.Windows.Forms.ComboBox comboBox4;
+        private System.Windows.Forms.ComboBox cbxIndex;
+        private System.Windows.Forms.ComboBox cbxCity;
+        private System.Windows.Forms.ComboBox cbxRegion;
+        private System.Windows.Forms.ComboBox cbxStreet;
         private System.Windows.Forms.BindingSource bsRegion;
         private System.Windows.Forms.BindingSource bsRegion;
         private System.Windows.Forms.BindingSource bsCity;
         private System.Windows.Forms.BindingSource bsCity;
         private System.Windows.Forms.BindingSource bsIndex;
         private System.Windows.Forms.BindingSource bsIndex;

+ 25 - 0
СУБД Альфапол/FormAddEdit.cs

@@ -41,9 +41,34 @@ namespace СУБД_Альфапол
 
 
         private void btnSave_Click(object sender, EventArgs e)
         private void btnSave_Click(object sender, EventArgs e)
         {
         {
+            if(tbxNamePartner.Text == "" || tbxEmail.Text == "" || tbxHouse.Text == "" || tbxName.Text == "" || tbxPatronymic.Text == "" || tbxPhone.Text == "" || tbxRating.Text == "" || tbxSurname.Text == "" || cbxCity.SelectedIndex == -1 || cbxIndex.SelectedIndex == -1 || cbxRegion.SelectedIndex == -1 || cbxStreet.SelectedIndex == -1 || cbxTypePartner.SelectedIndex == -1)
+            {
+                MessageBox.Show("Поля не должны быть пустыми!", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                return;
+            }
+
+            if (int.Parse(tbxRating.Text) < 0)
+            {
+                MessageBox.Show("Рейтинг не может быть отрицательным!", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                return;
+            }
+
             bsPartner.EndEdit();
             bsPartner.EndEdit();
             this.partnerTableAdapter.Update(this.dbAlphapolAGDataSet.Partner);
             this.partnerTableAdapter.Update(this.dbAlphapolAGDataSet.Partner);
             Close();
             Close();
         }
         }
+        // если текстовое поле связано с БД, то при попытке сохранить изменения наступает событие Validating, в обработчике этого события можно выводить сообщения об ошибке
+        private void tbxRating_Validating(object sender, CancelEventArgs e)
+        {
+            try
+            {
+                int r = int.Parse(tbxRating.Text);
+            }
+            catch 
+            {
+                MessageBox.Show("Рейтинг должен быть целым не отрицательным числом!", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
     }
     }
 }
 }

+ 30 - 30
СУБД Альфапол/FormAddEdit.resx

@@ -117,33 +117,6 @@
   <resheader name="writer">
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   </resheader>
-  <metadata name="bsPartner.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
-  <metadata name="dbAlphapolAGDataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>121, 17</value>
-  </metadata>
-  <metadata name="partnerTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>293, 17</value>
-  </metadata>
-  <metadata name="tableAdapterManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>454, 17</value>
-  </metadata>
-  <metadata name="cityTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>174, 54</value>
-  </metadata>
-  <metadata name="indexPartnerTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>316, 54</value>
-  </metadata>
-  <metadata name="regionTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 54</value>
-  </metadata>
-  <metadata name="streetTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>506, 54</value>
-  </metadata>
-  <metadata name="typePartnerTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>751, 17</value>
-  </metadata>
   <metadata name="namePartnerLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <metadata name="namePartnerLabel.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>False</value>
     <value>False</value>
   </metadata>
   </metadata>
@@ -174,9 +147,6 @@
   <metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>False</value>
     <value>False</value>
   </metadata>
   </metadata>
-  <metadata name="bsTypePartner.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>623, 17</value>
-  </metadata>
   <metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>False</value>
     <value>False</value>
   </metadata>
   </metadata>
@@ -189,6 +159,36 @@
   <metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>False</value>
     <value>False</value>
   </metadata>
   </metadata>
+  <metadata name="bsPartner.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="dbAlphapolAGDataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>121, 17</value>
+  </metadata>
+  <metadata name="partnerTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>293, 17</value>
+  </metadata>
+  <metadata name="tableAdapterManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>454, 17</value>
+  </metadata>
+  <metadata name="cityTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>174, 54</value>
+  </metadata>
+  <metadata name="indexPartnerTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>316, 54</value>
+  </metadata>
+  <metadata name="regionTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 54</value>
+  </metadata>
+  <metadata name="streetTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>506, 54</value>
+  </metadata>
+  <metadata name="typePartnerTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>751, 17</value>
+  </metadata>
+  <metadata name="bsTypePartner.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>623, 17</value>
+  </metadata>
   <metadata name="bsIndex.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
   <metadata name="bsIndex.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>1209, 17</value>
     <value>1209, 17</value>
   </metadata>
   </metadata>

+ 147 - 35
СУБД Альфапол/FormManager.Designer.cs

@@ -35,25 +35,36 @@
             this.lblPhoto = new System.Windows.Forms.Label();
             this.lblPhoto = new System.Windows.Forms.Label();
             this.bsUsers = new System.Windows.Forms.BindingSource(this.components);
             this.bsUsers = new System.Windows.Forms.BindingSource(this.components);
             this.dbAlphapolAGDataSet = new СУБД_Альфапол.dbAlphapolAGDataSet();
             this.dbAlphapolAGDataSet = new СУБД_Альфапол.dbAlphapolAGDataSet();
+            this.pbxPhoto = new System.Windows.Forms.PictureBox();
             this.lblPatr = new System.Windows.Forms.Label();
             this.lblPatr = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.lblName = new System.Windows.Forms.Label();
             this.lblName = new System.Windows.Forms.Label();
             this.lblFan = new System.Windows.Forms.Label();
             this.lblFan = new System.Windows.Forms.Label();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.managerTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.ManagerTableAdapter();
             this.managerTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.ManagerTableAdapter();
             this.dgvPartner = new System.Windows.Forms.DataGridView();
             this.dgvPartner = new System.Windows.Forms.DataGridView();
             this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Info = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Info = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Discount = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Discount = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.btnLogin = new System.Windows.Forms.Button();
             this.btnLogin = new System.Windows.Forms.Button();
-            this.button1 = new System.Windows.Forms.Button();
-            this.pbxPhoto = new System.Windows.Forms.PictureBox();
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.tbxFind = new System.Windows.Forms.TextBox();
+            this.cbxFindReting = new System.Windows.Forms.CheckBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.tbxMinRating = new System.Windows.Forms.TextBox();
+            this.tbxMaxReting = new System.Windows.Forms.TextBox();
+            this.cmbTypePartner = new System.Windows.Forms.ComboBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.bsTypeForFilter = new System.Windows.Forms.BindingSource(this.components);
+            this.typeForFilterTableAdapter = new СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters.TypeForFilterTableAdapter();
             this.panel1.SuspendLayout();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dbAlphapolAGDataSet)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dbAlphapolAGDataSet)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvPartner)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbxPhoto)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbxPhoto)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvPartner)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.bsTypeForFilter)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
             // panel1
             // panel1
@@ -93,6 +104,16 @@
             this.dbAlphapolAGDataSet.DataSetName = "dbAlphapolAGDataSet";
             this.dbAlphapolAGDataSet.DataSetName = "dbAlphapolAGDataSet";
             this.dbAlphapolAGDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
             this.dbAlphapolAGDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
             // 
             // 
+            // pbxPhoto
+            // 
+            this.pbxPhoto.Dock = System.Windows.Forms.DockStyle.Right;
+            this.pbxPhoto.Location = new System.Drawing.Point(885, 0);
+            this.pbxPhoto.Name = "pbxPhoto";
+            this.pbxPhoto.Size = new System.Drawing.Size(131, 125);
+            this.pbxPhoto.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pbxPhoto.TabIndex = 12;
+            this.pbxPhoto.TabStop = false;
+            // 
             // lblPatr
             // lblPatr
             // 
             // 
             this.lblPatr.AutoSize = true;
             this.lblPatr.AutoSize = true;
@@ -137,6 +158,18 @@
             this.lblFan.TabIndex = 9;
             this.lblFan.TabIndex = 9;
             this.lblFan.Text = "label4";
             this.lblFan.Text = "label4";
             // 
             // 
+            // pictureBox1
+            // 
+            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
+            this.pictureBox1.Image = global::СУБД_Альфапол.Properties.Resources.Альфапол;
+            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(145, 125);
+            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox1.TabIndex = 0;
+            this.pictureBox1.TabStop = false;
+            // 
             // managerTableAdapter
             // managerTableAdapter
             // 
             // 
             this.managerTableAdapter.ClearBeforeFill = true;
             this.managerTableAdapter.ClearBeforeFill = true;
@@ -193,7 +226,7 @@
             // 
             // 
             this.btnLogin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(161)))), ((int)(((byte)(99)))), ((int)(((byte)(245)))));
             this.btnLogin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(161)))), ((int)(((byte)(99)))), ((int)(((byte)(245)))));
             this.btnLogin.ForeColor = System.Drawing.SystemColors.Control;
             this.btnLogin.ForeColor = System.Drawing.SystemColors.Control;
-            this.btnLogin.Location = new System.Drawing.Point(12, 131);
+            this.btnLogin.Location = new System.Drawing.Point(800, 131);
             this.btnLogin.Name = "btnLogin";
             this.btnLogin.Name = "btnLogin";
             this.btnLogin.Size = new System.Drawing.Size(204, 30);
             this.btnLogin.Size = new System.Drawing.Size(204, 30);
             this.btnLogin.TabIndex = 10;
             this.btnLogin.TabIndex = 10;
@@ -201,38 +234,97 @@
             this.btnLogin.UseVisualStyleBackColor = false;
             this.btnLogin.UseVisualStyleBackColor = false;
             this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
             this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
             // 
             // 
-            // button1
+            // label2
             // 
             // 
-            this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(161)))), ((int)(((byte)(99)))), ((int)(((byte)(245)))));
-            this.button1.ForeColor = System.Drawing.SystemColors.Control;
-            this.button1.Location = new System.Drawing.Point(222, 131);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(204, 30);
-            this.button1.TabIndex = 11;
-            this.button1.Text = "Редактировать партнера";
-            this.button1.UseVisualStyleBackColor = false;
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(9, 135);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(238, 15);
+            this.label2.TabIndex = 11;
+            this.label2.Text = "Поиск по наименованию или фамалии";
             // 
             // 
-            // pbxPhoto
+            // tbxFind
             // 
             // 
-            this.pbxPhoto.Dock = System.Windows.Forms.DockStyle.Right;
-            this.pbxPhoto.Location = new System.Drawing.Point(885, 0);
-            this.pbxPhoto.Name = "pbxPhoto";
-            this.pbxPhoto.Size = new System.Drawing.Size(131, 125);
-            this.pbxPhoto.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
-            this.pbxPhoto.TabIndex = 12;
-            this.pbxPhoto.TabStop = false;
+            this.tbxFind.Location = new System.Drawing.Point(253, 132);
+            this.tbxFind.Name = "tbxFind";
+            this.tbxFind.Size = new System.Drawing.Size(139, 21);
+            this.tbxFind.TabIndex = 12;
+            this.tbxFind.TextChanged += new System.EventHandler(this.tbxFind_TextChanged);
             // 
             // 
-            // pictureBox1
+            // cbxFindReting
             // 
             // 
-            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
-            this.pictureBox1.Image = global::СУБД_Альфапол.Properties.Resources.Альфапол;
-            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(145, 125);
-            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
-            this.pictureBox1.TabIndex = 0;
-            this.pictureBox1.TabStop = false;
+            this.cbxFindReting.AutoSize = true;
+            this.cbxFindReting.Location = new System.Drawing.Point(240, 156);
+            this.cbxFindReting.Name = "cbxFindReting";
+            this.cbxFindReting.Size = new System.Drawing.Size(152, 19);
+            this.cbxFindReting.TabIndex = 13;
+            this.cbxFindReting.Text = "Искать по рейтингу";
+            this.cbxFindReting.UseVisualStyleBackColor = true;
+            this.cbxFindReting.CheckedChanged += new System.EventHandler(this.cbxFindReting_CheckedChanged);
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(411, 156);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(147, 15);
+            this.label3.TabIndex = 14;
+            this.label3.Text = "Минимальный рейтинг:";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(404, 135);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(154, 15);
+            this.label4.TabIndex = 15;
+            this.label4.Text = "Максимальный рейтинг:";
+            // 
+            // tbxMinRating
+            // 
+            this.tbxMinRating.Location = new System.Drawing.Point(564, 153);
+            this.tbxMinRating.Name = "tbxMinRating";
+            this.tbxMinRating.Size = new System.Drawing.Size(49, 21);
+            this.tbxMinRating.TabIndex = 16;
+            this.tbxMinRating.TextChanged += new System.EventHandler(this.tbxMinRating_TextChanged);
+            // 
+            // tbxMaxReting
+            // 
+            this.tbxMaxReting.Location = new System.Drawing.Point(564, 131);
+            this.tbxMaxReting.Name = "tbxMaxReting";
+            this.tbxMaxReting.Size = new System.Drawing.Size(49, 21);
+            this.tbxMaxReting.TabIndex = 17;
+            this.tbxMaxReting.TextChanged += new System.EventHandler(this.tbxMaxReting_TextChanged);
+            // 
+            // cmbTypePartner
+            // 
+            this.cmbTypePartner.DataSource = this.bsTypeForFilter;
+            this.cmbTypePartner.DisplayMember = "Type";
+            this.cmbTypePartner.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbTypePartner.FormattingEnabled = true;
+            this.cmbTypePartner.Location = new System.Drawing.Point(619, 152);
+            this.cmbTypePartner.Name = "cmbTypePartner";
+            this.cmbTypePartner.Size = new System.Drawing.Size(140, 23);
+            this.cmbTypePartner.TabIndex = 18;
+            this.cmbTypePartner.SelectedIndexChanged += new System.EventHandler(this.cmbTypePartner_SelectedIndexChanged);
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(619, 134);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(140, 15);
+            this.label5.TabIndex = 19;
+            this.label5.Text = "Фильтрация по типу:";
+            // 
+            // bsTypeForFilter
+            // 
+            this.bsTypeForFilter.DataMember = "TypeForFilter";
+            this.bsTypeForFilter.DataSource = this.dbAlphapolAGDataSet;
+            // 
+            // typeForFilterTableAdapter
+            // 
+            this.typeForFilterTableAdapter.ClearBeforeFill = true;
             // 
             // 
             // FormManager
             // FormManager
             // 
             // 
@@ -240,7 +332,15 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.White;
             this.BackColor = System.Drawing.Color.White;
             this.ClientSize = new System.Drawing.Size(1016, 522);
             this.ClientSize = new System.Drawing.Size(1016, 522);
-            this.Controls.Add(this.button1);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.cmbTypePartner);
+            this.Controls.Add(this.tbxMaxReting);
+            this.Controls.Add(this.tbxMinRating);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.cbxFindReting);
+            this.Controls.Add(this.tbxFind);
+            this.Controls.Add(this.label2);
             this.Controls.Add(this.btnLogin);
             this.Controls.Add(this.btnLogin);
             this.Controls.Add(this.dgvPartner);
             this.Controls.Add(this.dgvPartner);
             this.Controls.Add(this.panel1);
             this.Controls.Add(this.panel1);
@@ -255,10 +355,12 @@
             this.panel1.PerformLayout();
             this.panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.bsUsers)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dbAlphapolAGDataSet)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dbAlphapolAGDataSet)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.dgvPartner)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbxPhoto)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pbxPhoto)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvPartner)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.bsTypeForFilter)).EndInit();
             this.ResumeLayout(false);
             this.ResumeLayout(false);
+            this.PerformLayout();
 
 
         }
         }
 
 
@@ -280,6 +382,16 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Info;
         private System.Windows.Forms.DataGridViewTextBoxColumn Info;
         private System.Windows.Forms.DataGridViewTextBoxColumn Discount;
         private System.Windows.Forms.DataGridViewTextBoxColumn Discount;
         private System.Windows.Forms.Button btnLogin;
         private System.Windows.Forms.Button btnLogin;
-        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Label label2;
+        public System.Windows.Forms.TextBox tbxFind;
+        private System.Windows.Forms.CheckBox cbxFindReting;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label4;
+        public System.Windows.Forms.TextBox tbxMinRating;
+        public System.Windows.Forms.TextBox tbxMaxReting;
+        private System.Windows.Forms.ComboBox cmbTypePartner;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.BindingSource bsTypeForFilter;
+        private dbAlphapolAGDataSetTableAdapters.TypeForFilterTableAdapter typeForFilterTableAdapter;
     }
     }
 }
 }

+ 53 - 3
СУБД Альфапол/FormManager.cs

@@ -18,8 +18,21 @@ namespace СУБД_Альфапол
             InitializeComponent();
             InitializeComponent();
         }
         }
 
 
+       
         void FillPartner()
         void FillPartner()
         {
         {
+            string additionalUslovie = $" where (surname like '{tbxFind.Text}%' or NamePartner like '{tbxFind.Text}%')";
+
+            if(cbxFindReting.Checked && tbxMaxReting.Text != "" && tbxMinRating.Text != "")
+            {
+                additionalUslovie += $" and Rating >= {tbxMinRating.Text} and Rating <= {tbxMaxReting.Text}";
+            }
+
+            if(cmbTypePartner.Text != "Все типы")
+            {
+                additionalUslovie += $"  and Type = {cmbTypePartner.Text}";
+            }
+
             SqlConnection con = new SqlConnection(FormAutorization.txtCon);
             SqlConnection con = new SqlConnection(FormAutorization.txtCon);
             con.Open();
             con.Open();
             string txtQuery = $@"
             string txtQuery = $@"
@@ -27,10 +40,19 @@ SELECT        Partner.idPartner, TypePartner.Type, Partner.NamePartner, Partner.
 Partner.Phone, Partner.Rating, (SELECT        sum(CountProduct)
 Partner.Phone, Partner.Rating, (SELECT        sum(CountProduct)
 FROM            ProductPartner where idPartner = Partner.idPartner) as CountSale
 FROM            ProductPartner where idPartner = Partner.idPartner) as CountSale
 FROM            Partner INNER JOIN
 FROM            Partner INNER JOIN
-                         TypePartner ON Partner.idTypePartner = TypePartner.idTypePartner";
-            SqlCommand query = new SqlCommand(txtQuery, con);
-            SqlDataReader res = query.ExecuteReader();
+                         TypePartner ON Partner.idTypePartner = TypePartner.idTypePartner" + additionalUslovie;
 
 
+            SqlCommand query = new SqlCommand(txtQuery, con);
+            SqlDataReader res = null;
+            try
+            {
+               res = query.ExecuteReader();
+            }
+            catch 
+            { 
+                dgvPartner.Rows.Clear();
+                return;
+            }
             dgvPartner.Rows.Clear();
             dgvPartner.Rows.Clear();
             while (res.Read())
             while (res.Read())
             {
             {
@@ -70,6 +92,8 @@ FROM            Partner INNER JOIN
 
 
         private void FormManager_Load(object sender, EventArgs e)
         private void FormManager_Load(object sender, EventArgs e)
         {
         {
+            // TODO: This line of code loads data into the 'dbAlphapolAGDataSet.TypeForFilter' table. You can move, or remove it, as needed.
+            this.typeForFilterTableAdapter.Fill(this.dbAlphapolAGDataSet.TypeForFilter);
             // TODO: This line of code loads data into the 'dbAlphapolAGDataSet.Manager' table. You can move, or remove it, as needed.
             // TODO: This line of code loads data into the 'dbAlphapolAGDataSet.Manager' table. You can move, or remove it, as needed.
             this.managerTableAdapter.Fill(this.dbAlphapolAGDataSet.Manager);
             this.managerTableAdapter.Fill(this.dbAlphapolAGDataSet.Manager);
             try
             try
@@ -96,5 +120,31 @@ FROM            Partner INNER JOIN
             formAddEdit.ShowDialog();
             formAddEdit.ShowDialog();
             FillPartner();
             FillPartner();
         }
         }
+
+        private void tbxFind_TextChanged(object sender, EventArgs e)
+        {
+            FillPartner();
+
+        }
+
+        private void cbxFindReting_CheckedChanged(object sender, EventArgs e)
+        {
+            FillPartner();
+        }
+
+        private void tbxMaxReting_TextChanged(object sender, EventArgs e)
+        {
+            FillPartner();
+        }
+
+        private void tbxMinRating_TextChanged(object sender, EventArgs e)
+        {
+            FillPartner();
+        }
+
+        private void cmbTypePartner_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            FillPartner();
+        }
     }
     }
 }
 }

+ 6 - 0
СУБД Альфапол/FormManager.resx

@@ -135,6 +135,12 @@
   <metadata name="Discount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <metadata name="Discount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
     <value>True</value>
   </metadata>
   </metadata>
+  <metadata name="bsTypeForFilter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>453, 17</value>
+  </metadata>
+  <metadata name="typeForFilterTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>586, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
     <value>

BIN
СУБД Альфапол/bin/Debug/СУБД Альфапол.exe


+ 529 - 0
СУБД Альфапол/dbAlphapolAGDataSet.Designer.cs

@@ -46,6 +46,8 @@ namespace СУБД_Альфапол {
         
         
         private TypeProductDataTable tableTypeProduct;
         private TypeProductDataTable tableTypeProduct;
         
         
+        private TypeForFilterDataTable tableTypeForFilter;
+        
         private global::System.Data.DataRelation relationFK_Partner_City;
         private global::System.Data.DataRelation relationFK_Partner_City;
         
         
         private global::System.Data.DataRelation relationFK_Partner_IndexPartner;
         private global::System.Data.DataRelation relationFK_Partner_IndexPartner;
@@ -123,6 +125,9 @@ namespace СУБД_Альфапол {
                 if ((ds.Tables["TypeProduct"] != null)) {
                 if ((ds.Tables["TypeProduct"] != null)) {
                     base.Tables.Add(new TypeProductDataTable(ds.Tables["TypeProduct"]));
                     base.Tables.Add(new TypeProductDataTable(ds.Tables["TypeProduct"]));
                 }
                 }
+                if ((ds.Tables["TypeForFilter"] != null)) {
+                    base.Tables.Add(new TypeForFilterDataTable(ds.Tables["TypeForFilter"]));
+                }
                 this.DataSetName = ds.DataSetName;
                 this.DataSetName = ds.DataSetName;
                 this.Prefix = ds.Prefix;
                 this.Prefix = ds.Prefix;
                 this.Namespace = ds.Namespace;
                 this.Namespace = ds.Namespace;
@@ -251,6 +256,16 @@ namespace СУБД_Альфапол {
             }
             }
         }
         }
         
         
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        [global::System.ComponentModel.Browsable(false)]
+        [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
+        public TypeForFilterDataTable TypeForFilter {
+            get {
+                return this.tableTypeForFilter;
+            }
+        }
+        
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
         [global::System.ComponentModel.BrowsableAttribute(true)]
         [global::System.ComponentModel.BrowsableAttribute(true)]
@@ -351,6 +366,9 @@ namespace СУБД_Альфапол {
                 if ((ds.Tables["TypeProduct"] != null)) {
                 if ((ds.Tables["TypeProduct"] != null)) {
                     base.Tables.Add(new TypeProductDataTable(ds.Tables["TypeProduct"]));
                     base.Tables.Add(new TypeProductDataTable(ds.Tables["TypeProduct"]));
                 }
                 }
+                if ((ds.Tables["TypeForFilter"] != null)) {
+                    base.Tables.Add(new TypeForFilterDataTable(ds.Tables["TypeForFilter"]));
+                }
                 this.DataSetName = ds.DataSetName;
                 this.DataSetName = ds.DataSetName;
                 this.Prefix = ds.Prefix;
                 this.Prefix = ds.Prefix;
                 this.Namespace = ds.Namespace;
                 this.Namespace = ds.Namespace;
@@ -450,6 +468,12 @@ namespace СУБД_Альфапол {
                     this.tableTypeProduct.InitVars();
                     this.tableTypeProduct.InitVars();
                 }
                 }
             }
             }
+            this.tableTypeForFilter = ((TypeForFilterDataTable)(base.Tables["TypeForFilter"]));
+            if ((initTable == true)) {
+                if ((this.tableTypeForFilter != null)) {
+                    this.tableTypeForFilter.InitVars();
+                }
+            }
             this.relationFK_Partner_City = this.Relations["FK_Partner_City"];
             this.relationFK_Partner_City = this.Relations["FK_Partner_City"];
             this.relationFK_Partner_IndexPartner = this.Relations["FK_Partner_IndexPartner"];
             this.relationFK_Partner_IndexPartner = this.Relations["FK_Partner_IndexPartner"];
             this.relationFK_Partner_Region = this.Relations["FK_Partner_Region"];
             this.relationFK_Partner_Region = this.Relations["FK_Partner_Region"];
@@ -490,6 +514,8 @@ namespace СУБД_Альфапол {
             base.Tables.Add(this.tableTypePartner);
             base.Tables.Add(this.tableTypePartner);
             this.tableTypeProduct = new TypeProductDataTable();
             this.tableTypeProduct = new TypeProductDataTable();
             base.Tables.Add(this.tableTypeProduct);
             base.Tables.Add(this.tableTypeProduct);
+            this.tableTypeForFilter = new TypeForFilterDataTable();
+            base.Tables.Add(this.tableTypeForFilter);
             this.relationFK_Partner_City = new global::System.Data.DataRelation("FK_Partner_City", new global::System.Data.DataColumn[] {
             this.relationFK_Partner_City = new global::System.Data.DataRelation("FK_Partner_City", new global::System.Data.DataColumn[] {
                         this.tableCity.idCityColumn}, new global::System.Data.DataColumn[] {
                         this.tableCity.idCityColumn}, new global::System.Data.DataColumn[] {
                         this.tablePartner.idCityColumn}, false);
                         this.tablePartner.idCityColumn}, false);
@@ -590,6 +616,12 @@ namespace СУБД_Альфапол {
             return false;
             return false;
         }
         }
         
         
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        private bool ShouldSerializeTypeForFilter() {
+            return false;
+        }
+        
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
         private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
         private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
@@ -678,6 +710,9 @@ namespace СУБД_Альфапол {
         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
         [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
         public delegate void TypeProductRowChangeEventHandler(object sender, TypeProductRowChangeEvent e);
         public delegate void TypeProductRowChangeEventHandler(object sender, TypeProductRowChangeEvent e);
         
         
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        public delegate void TypeForFilterRowChangeEventHandler(object sender, TypeForFilterRowChangeEvent e);
+        
         /// <summary>
         /// <summary>
         ///Represents the strongly named DataTable class.
         ///Represents the strongly named DataTable class.
         ///</summary>
         ///</summary>
@@ -4113,6 +4148,256 @@ namespace СУБД_Альфапол {
             }
             }
         }
         }
         
         
+        /// <summary>
+        ///Represents the strongly named DataTable class.
+        ///</summary>
+        [global::System.Serializable()]
+        [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
+        public partial class TypeForFilterDataTable : global::System.Data.TypedTableBase<TypeForFilterRow> {
+            
+            private global::System.Data.DataColumn columnType;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public TypeForFilterDataTable() {
+                this.TableName = "TypeForFilter";
+                this.BeginInit();
+                this.InitClass();
+                this.EndInit();
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            internal TypeForFilterDataTable(global::System.Data.DataTable table) {
+                this.TableName = table.TableName;
+                if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
+                    this.CaseSensitive = table.CaseSensitive;
+                }
+                if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
+                    this.Locale = table.Locale;
+                }
+                if ((table.Namespace != table.DataSet.Namespace)) {
+                    this.Namespace = table.Namespace;
+                }
+                this.Prefix = table.Prefix;
+                this.MinimumCapacity = table.MinimumCapacity;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            protected TypeForFilterDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : 
+                    base(info, context) {
+                this.InitVars();
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public global::System.Data.DataColumn TypeColumn {
+                get {
+                    return this.columnType;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            [global::System.ComponentModel.Browsable(false)]
+            public int Count {
+                get {
+                    return this.Rows.Count;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public TypeForFilterRow this[int index] {
+                get {
+                    return ((TypeForFilterRow)(this.Rows[index]));
+                }
+            }
+            
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public event TypeForFilterRowChangeEventHandler TypeForFilterRowChanging;
+            
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public event TypeForFilterRowChangeEventHandler TypeForFilterRowChanged;
+            
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public event TypeForFilterRowChangeEventHandler TypeForFilterRowDeleting;
+            
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public event TypeForFilterRowChangeEventHandler TypeForFilterRowDeleted;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public void AddTypeForFilterRow(TypeForFilterRow row) {
+                this.Rows.Add(row);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public TypeForFilterRow AddTypeForFilterRow(string Type) {
+                TypeForFilterRow rowTypeForFilterRow = ((TypeForFilterRow)(this.NewRow()));
+                object[] columnValuesArray = new object[] {
+                        Type};
+                rowTypeForFilterRow.ItemArray = columnValuesArray;
+                this.Rows.Add(rowTypeForFilterRow);
+                return rowTypeForFilterRow;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public override global::System.Data.DataTable Clone() {
+                TypeForFilterDataTable cln = ((TypeForFilterDataTable)(base.Clone()));
+                cln.InitVars();
+                return cln;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            protected override global::System.Data.DataTable CreateInstance() {
+                return new TypeForFilterDataTable();
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            internal void InitVars() {
+                this.columnType = base.Columns["Type"];
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            private void InitClass() {
+                this.columnType = new global::System.Data.DataColumn("Type", typeof(string), null, global::System.Data.MappingType.Element);
+                base.Columns.Add(this.columnType);
+                this.columnType.ReadOnly = true;
+                this.columnType.Caption = "Column1";
+                this.columnType.MaxLength = 50;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public TypeForFilterRow NewTypeForFilterRow() {
+                return ((TypeForFilterRow)(this.NewRow()));
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
+                return new TypeForFilterRow(builder);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            protected override global::System.Type GetRowType() {
+                return typeof(TypeForFilterRow);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowChanged(e);
+                if ((this.TypeForFilterRowChanged != null)) {
+                    this.TypeForFilterRowChanged(this, new TypeForFilterRowChangeEvent(((TypeForFilterRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowChanging(e);
+                if ((this.TypeForFilterRowChanging != null)) {
+                    this.TypeForFilterRowChanging(this, new TypeForFilterRowChangeEvent(((TypeForFilterRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowDeleted(e);
+                if ((this.TypeForFilterRowDeleted != null)) {
+                    this.TypeForFilterRowDeleted(this, new TypeForFilterRowChangeEvent(((TypeForFilterRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
+                base.OnRowDeleting(e);
+                if ((this.TypeForFilterRowDeleting != null)) {
+                    this.TypeForFilterRowDeleting(this, new TypeForFilterRowChangeEvent(((TypeForFilterRow)(e.Row)), e.Action));
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public void RemoveTypeForFilterRow(TypeForFilterRow row) {
+                this.Rows.Remove(row);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.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();
+                dbAlphapolAGDataSet ds = new dbAlphapolAGDataSet();
+                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 = "TypeForFilterDataTable";
+                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>
         /// <summary>
         ///Represents strongly named DataRow class.
         ///Represents strongly named DataRow class.
         ///</summary>
         ///</summary>
@@ -5611,6 +5896,49 @@ namespace СУБД_Альфапол {
             }
             }
         }
         }
         
         
+        /// <summary>
+        ///Represents strongly named DataRow class.
+        ///</summary>
+        public partial class TypeForFilterRow : global::System.Data.DataRow {
+            
+            private TypeForFilterDataTable tableTypeForFilter;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            internal TypeForFilterRow(global::System.Data.DataRowBuilder rb) : 
+                    base(rb) {
+                this.tableTypeForFilter = ((TypeForFilterDataTable)(this.Table));
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public string Type {
+                get {
+                    try {
+                        return ((string)(this[this.tableTypeForFilter.TypeColumn]));
+                    }
+                    catch (global::System.InvalidCastException e) {
+                        throw new global::System.Data.StrongTypingException("The value for column \'Type\' in table \'TypeForFilter\' is DBNull.", e);
+                    }
+                }
+                set {
+                    this[this.tableTypeForFilter.TypeColumn] = value;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public bool IsTypeNull() {
+                return this.IsNull(this.tableTypeForFilter.TypeColumn);
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public void SetTypeNull() {
+                this[this.tableTypeForFilter.TypeColumn] = global::System.Convert.DBNull;
+            }
+        }
+        
         /// <summary>
         /// <summary>
         ///Row event argument class
         ///Row event argument class
         ///</summary>
         ///</summary>
@@ -5984,6 +6312,40 @@ namespace СУБД_Альфапол {
                 }
                 }
             }
             }
         }
         }
+        
+        /// <summary>
+        ///Row event argument class
+        ///</summary>
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        public class TypeForFilterRowChangeEvent : global::System.EventArgs {
+            
+            private TypeForFilterRow eventRow;
+            
+            private global::System.Data.DataRowAction eventAction;
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public TypeForFilterRowChangeEvent(TypeForFilterRow row, global::System.Data.DataRowAction action) {
+                this.eventRow = row;
+                this.eventAction = action;
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public TypeForFilterRow Row {
+                get {
+                    return this.eventRow;
+                }
+            }
+            
+            [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+            public global::System.Data.DataRowAction Action {
+                get {
+                    return this.eventAction;
+                }
+            }
+        }
     }
     }
 }
 }
 namespace СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters {
 namespace СУБД_Альфапол.dbAlphapolAGDataSetTableAdapters {
@@ -10516,6 +10878,173 @@ SELECT idTypeProduct, TypeProduct, Coefficient FROM TypeProduct WHERE (idTypePro
         }
         }
     }
     }
     
     
+    /// <summary>
+    ///Represents the connection and commands used to retrieve and save data.
+    ///</summary>
+    [global::System.ComponentModel.DesignerCategoryAttribute("code")]
+    [global::System.ComponentModel.ToolboxItem(true)]
+    [global::System.ComponentModel.DataObjectAttribute(true)]
+    [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
+        ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+    [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+    public partial class TypeForFilterTableAdapter : global::System.ComponentModel.Component {
+        
+        private global::System.Data.SqlClient.SqlDataAdapter _adapter;
+        
+        private global::System.Data.SqlClient.SqlConnection _connection;
+        
+        private global::System.Data.SqlClient.SqlTransaction _transaction;
+        
+        private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
+        
+        private bool _clearBeforeFill;
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        public TypeForFilterTableAdapter() {
+            this.ClearBeforeFill = true;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
+            get {
+                if ((this._adapter == null)) {
+                    this.InitAdapter();
+                }
+                return this._adapter;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        internal global::System.Data.SqlClient.SqlConnection Connection {
+            get {
+                if ((this._connection == null)) {
+                    this.InitConnection();
+                }
+                return this._connection;
+            }
+            set {
+                this._connection = value;
+                if ((this.Adapter.InsertCommand != null)) {
+                    this.Adapter.InsertCommand.Connection = value;
+                }
+                if ((this.Adapter.DeleteCommand != null)) {
+                    this.Adapter.DeleteCommand.Connection = value;
+                }
+                if ((this.Adapter.UpdateCommand != null)) {
+                    this.Adapter.UpdateCommand.Connection = value;
+                }
+                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
+                    if ((this.CommandCollection[i] != null)) {
+                        ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
+                    }
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        internal global::System.Data.SqlClient.SqlTransaction Transaction {
+            get {
+                return this._transaction;
+            }
+            set {
+                this._transaction = value;
+                for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
+                    this.CommandCollection[i].Transaction = this._transaction;
+                }
+                if (((this.Adapter != null) 
+                            && (this.Adapter.DeleteCommand != null))) {
+                    this.Adapter.DeleteCommand.Transaction = this._transaction;
+                }
+                if (((this.Adapter != null) 
+                            && (this.Adapter.InsertCommand != null))) {
+                    this.Adapter.InsertCommand.Transaction = this._transaction;
+                }
+                if (((this.Adapter != null) 
+                            && (this.Adapter.UpdateCommand != null))) {
+                    this.Adapter.UpdateCommand.Transaction = this._transaction;
+                }
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
+            get {
+                if ((this._commandCollection == null)) {
+                    this.InitCommandCollection();
+                }
+                return this._commandCollection;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        public bool ClearBeforeFill {
+            get {
+                return this._clearBeforeFill;
+            }
+            set {
+                this._clearBeforeFill = value;
+            }
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        private void InitAdapter() {
+            this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
+            global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
+            tableMapping.SourceTable = "Table";
+            tableMapping.DataSetTable = "TypeForFilter";
+            tableMapping.ColumnMappings.Add("Column1", "Type");
+            this._adapter.TableMappings.Add(tableMapping);
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        private void InitConnection() {
+            this._connection = new global::System.Data.SqlClient.SqlConnection();
+            this._connection.ConnectionString = global::СУБД_Альфапол.Properties.Settings.Default.dbAlphapolAGConnectionString;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        private void InitCommandCollection() {
+            this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
+            this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
+            this._commandCollection[0].Connection = this.Connection;
+            this._commandCollection[0].CommandText = "select \'Все типы\'\r\nunion all\r\nselect type \r\nfrom TypePartner";
+            this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
+        public virtual int Fill(dbAlphapolAGDataSet.TypeForFilterDataTable dataTable) {
+            this.Adapter.SelectCommand = this.CommandCollection[0];
+            if ((this.ClearBeforeFill == true)) {
+                dataTable.Clear();
+            }
+            int returnValue = this.Adapter.Fill(dataTable);
+            return returnValue;
+        }
+        
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "17.0.0.0")]
+        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
+        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
+        public virtual dbAlphapolAGDataSet.TypeForFilterDataTable GetData() {
+            this.Adapter.SelectCommand = this.CommandCollection[0];
+            dbAlphapolAGDataSet.TypeForFilterDataTable dataTable = new dbAlphapolAGDataSet.TypeForFilterDataTable();
+            this.Adapter.Fill(dataTable);
+            return dataTable;
+        }
+    }
+    
     /// <summary>
     /// <summary>
     ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
     ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
     ///</summary>
     ///</summary>

+ 40 - 8
СУБД Альфапол/dbAlphapolAGDataSet.xsd

@@ -724,6 +724,25 @@ SELECT idTypeProduct, TypeProduct, Coefficient FROM TypeProduct WHERE (idTypePro
             </Mappings>
             </Mappings>
             <Sources />
             <Sources />
           </TableAdapter>
           </TableAdapter>
+          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TypeForFilterTableAdapter" GeneratorDataComponentClassName="TypeForFilterTableAdapter" Name="TypeForFilter" UserDataComponentName="TypeForFilterTableAdapter">
+            <MainSource>
+              <DbSource ConnectionRef="dbAlphapolAGConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
+                <SelectCommand>
+                  <DbCommand CommandType="Text" ModifiedByUser="true">
+                    <CommandText>select 'Все типы'
+union all
+select type 
+from TypePartner</CommandText>
+                    <Parameters />
+                  </DbCommand>
+                </SelectCommand>
+              </DbSource>
+            </MainSource>
+            <Mappings>
+              <Mapping SourceColumn="Column1" DataSetColumn="Type" />
+            </Mappings>
+            <Sources />
+          </TableAdapter>
         </Tables>
         </Tables>
         <Sources />
         <Sources />
       </DataSource>
       </DataSource>
@@ -978,6 +997,19 @@ SELECT idTypeProduct, TypeProduct, Coefficient FROM TypeProduct WHERE (idTypePro
             </xs:sequence>
             </xs:sequence>
           </xs:complexType>
           </xs:complexType>
         </xs:element>
         </xs:element>
+        <xs:element name="TypeForFilter" msprop:Generator_RowEvHandlerName="TypeForFilterRowChangeEventHandler" msprop:Generator_RowDeletedName="TypeForFilterRowDeleted" msprop:Generator_RowDeletingName="TypeForFilterRowDeleting" msprop:Generator_RowEvArgName="TypeForFilterRowChangeEvent" msprop:Generator_TablePropName="TypeForFilter" msprop:Generator_RowChangedName="TypeForFilterRowChanged" msprop:Generator_RowChangingName="TypeForFilterRowChanging" msprop:Generator_TableClassName="TypeForFilterDataTable" msprop:Generator_RowClassName="TypeForFilterRow" msprop:Generator_TableVarName="tableTypeForFilter" msprop:Generator_UserTableName="TypeForFilter">
+          <xs:complexType>
+            <xs:sequence>
+              <xs:element name="Type" msdata:ReadOnly="true" msdata:Caption="Column1" msprop:Generator_ColumnPropNameInRow="Type" msprop:Generator_ColumnPropNameInTable="TypeColumn" msprop:Generator_ColumnVarNameInTable="columnType" msprop:Generator_UserColumnName="Type" minOccurs="0">
+                <xs:simpleType>
+                  <xs:restriction base="xs:string">
+                    <xs:maxLength value="50" />
+                  </xs:restriction>
+                </xs:simpleType>
+              </xs:element>
+            </xs:sequence>
+          </xs:complexType>
+        </xs:element>
       </xs:choice>
       </xs:choice>
     </xs:complexType>
     </xs:complexType>
     <xs:unique name="Constraint1" msdata:PrimaryKey="true">
     <xs:unique name="Constraint1" msdata:PrimaryKey="true">
@@ -1027,14 +1059,14 @@ SELECT idTypeProduct, TypeProduct, Coefficient FROM TypeProduct WHERE (idTypePro
   </xs:element>
   </xs:element>
   <xs:annotation>
   <xs:annotation>
     <xs:appinfo>
     <xs:appinfo>
-      <msdata:Relationship name="FK_Partner_City" msdata:parent="City" msdata:child="Partner" msdata:parentkey="idCity" msdata:childkey="idCity" msprop:Generator_UserParentTable="City" msprop:Generator_UserChildTable="Partner" msprop:Generator_RelationVarName="relationFK_Partner_City" msprop:Generator_ChildPropName="GetPartnerRows" msprop:Generator_ParentPropName="CityRow" msprop:Generator_UserRelationName="FK_Partner_City" />
-      <msdata:Relationship name="FK_Partner_IndexPartner" msdata:parent="IndexPartner" msdata:child="Partner" msdata:parentkey="idIndex" msdata:childkey="idIndex" msprop:Generator_UserParentTable="IndexPartner" msprop:Generator_UserChildTable="Partner" msprop:Generator_RelationVarName="relationFK_Partner_IndexPartner" msprop:Generator_ChildPropName="GetPartnerRows" msprop:Generator_ParentPropName="IndexPartnerRow" msprop:Generator_UserRelationName="FK_Partner_IndexPartner" />
-      <msdata:Relationship name="FK_Partner_Region" msdata:parent="Region" msdata:child="Partner" msdata:parentkey="idRegion" msdata:childkey="idRegion" msprop:Generator_UserParentTable="Region" msprop:Generator_UserChildTable="Partner" msprop:Generator_RelationVarName="relationFK_Partner_Region" msprop:Generator_ChildPropName="GetPartnerRows" msprop:Generator_UserRelationName="FK_Partner_Region" msprop:Generator_ParentPropName="RegionRow" />
-      <msdata:Relationship name="FK_Partner_Street" msdata:parent="Street" msdata:child="Partner" msdata:parentkey="idStreet" msdata:childkey="idStreet" msprop:Generator_UserParentTable="Street" msprop:Generator_UserChildTable="Partner" msprop:Generator_RelationVarName="relationFK_Partner_Street" msprop:Generator_ChildPropName="GetPartnerRows" msprop:Generator_UserRelationName="FK_Partner_Street" msprop:Generator_ParentPropName="StreetRow" />
-      <msdata:Relationship name="FK_Partner_TypePartner" msdata:parent="TypePartner" msdata:child="Partner" msdata:parentkey="idTypePartner" msdata:childkey="idTypePartner" msprop:Generator_UserParentTable="TypePartner" msprop:Generator_UserChildTable="Partner" msprop:Generator_RelationVarName="relationFK_Partner_TypePartner" msprop:Generator_ChildPropName="GetPartnerRows" msprop:Generator_UserRelationName="FK_Partner_TypePartner" msprop:Generator_ParentPropName="TypePartnerRow" />
-      <msdata:Relationship name="FK_ProductPartner_Partner" msdata:parent="Partner" msdata:child="ProductPartner" msdata:parentkey="idPartner" msdata:childkey="idPartner" msprop:Generator_UserParentTable="Partner" msprop:Generator_UserChildTable="ProductPartner" msprop:Generator_RelationVarName="relationFK_ProductPartner_Partner" msprop:Generator_ChildPropName="GetProductPartnerRows" msprop:Generator_ParentPropName="PartnerRow" msprop:Generator_UserRelationName="FK_ProductPartner_Partner" />
-      <msdata:Relationship name="FK_ProductPartner_Products" msdata:parent="Products" msdata:child="ProductPartner" msdata:parentkey="idProduct" msdata:childkey="idProduct" msprop:Generator_UserParentTable="Products" msprop:Generator_UserChildTable="ProductPartner" msprop:Generator_RelationVarName="relationFK_ProductPartner_Products" msprop:Generator_ChildPropName="GetProductPartnerRows" msprop:Generator_UserRelationName="FK_ProductPartner_Products" msprop:Generator_ParentPropName="ProductsRow" />
-      <msdata:Relationship name="FK_Products_TypeProduct" msdata:parent="TypeProduct" msdata:child="Products" msdata:parentkey="idTypeProduct" msdata:childkey="idTypeProduct" msprop:Generator_UserParentTable="TypeProduct" msprop:Generator_UserChildTable="Products" msprop:Generator_RelationVarName="relationFK_Products_TypeProduct" msprop:Generator_ChildPropName="GetProductsRows" msprop:Generator_UserRelationName="FK_Products_TypeProduct" msprop:Generator_ParentPropName="TypeProductRow" />
+      <msdata:Relationship name="FK_Partner_City" msdata:parent="City" msdata:child="Partner" msdata:parentkey="idCity" msdata:childkey="idCity" msprop:Generator_UserParentTable="City" msprop:Generator_UserChildTable="Partner" msprop:Generator_RelationVarName="relationFK_Partner_City" msprop:Generator_ChildPropName="GetPartnerRows" msprop:Generator_UserRelationName="FK_Partner_City" msprop:Generator_ParentPropName="CityRow" />
+      <msdata:Relationship name="FK_Partner_IndexPartner" msdata:parent="IndexPartner" msdata:child="Partner" msdata:parentkey="idIndex" msdata:childkey="idIndex" msprop:Generator_UserParentTable="IndexPartner" msprop:Generator_UserChildTable="Partner" msprop:Generator_RelationVarName="relationFK_Partner_IndexPartner" msprop:Generator_ChildPropName="GetPartnerRows" msprop:Generator_UserRelationName="FK_Partner_IndexPartner" msprop:Generator_ParentPropName="IndexPartnerRow" />
+      <msdata:Relationship name="FK_Partner_Region" msdata:parent="Region" msdata:child="Partner" msdata:parentkey="idRegion" msdata:childkey="idRegion" msprop:Generator_UserParentTable="Region" msprop:Generator_UserChildTable="Partner" msprop:Generator_RelationVarName="relationFK_Partner_Region" msprop:Generator_ChildPropName="GetPartnerRows" msprop:Generator_ParentPropName="RegionRow" msprop:Generator_UserRelationName="FK_Partner_Region" />
+      <msdata:Relationship name="FK_Partner_Street" msdata:parent="Street" msdata:child="Partner" msdata:parentkey="idStreet" msdata:childkey="idStreet" msprop:Generator_UserParentTable="Street" msprop:Generator_UserChildTable="Partner" msprop:Generator_RelationVarName="relationFK_Partner_Street" msprop:Generator_ChildPropName="GetPartnerRows" msprop:Generator_ParentPropName="StreetRow" msprop:Generator_UserRelationName="FK_Partner_Street" />
+      <msdata:Relationship name="FK_Partner_TypePartner" msdata:parent="TypePartner" msdata:child="Partner" msdata:parentkey="idTypePartner" msdata:childkey="idTypePartner" msprop:Generator_UserParentTable="TypePartner" msprop:Generator_UserChildTable="Partner" msprop:Generator_RelationVarName="relationFK_Partner_TypePartner" msprop:Generator_ChildPropName="GetPartnerRows" msprop:Generator_ParentPropName="TypePartnerRow" msprop:Generator_UserRelationName="FK_Partner_TypePartner" />
+      <msdata:Relationship name="FK_ProductPartner_Partner" msdata:parent="Partner" msdata:child="ProductPartner" msdata:parentkey="idPartner" msdata:childkey="idPartner" msprop:Generator_UserParentTable="Partner" msprop:Generator_UserChildTable="ProductPartner" msprop:Generator_RelationVarName="relationFK_ProductPartner_Partner" msprop:Generator_ChildPropName="GetProductPartnerRows" msprop:Generator_UserRelationName="FK_ProductPartner_Partner" msprop:Generator_ParentPropName="PartnerRow" />
+      <msdata:Relationship name="FK_ProductPartner_Products" msdata:parent="Products" msdata:child="ProductPartner" msdata:parentkey="idProduct" msdata:childkey="idProduct" msprop:Generator_UserParentTable="Products" msprop:Generator_UserChildTable="ProductPartner" msprop:Generator_RelationVarName="relationFK_ProductPartner_Products" msprop:Generator_ChildPropName="GetProductPartnerRows" msprop:Generator_ParentPropName="ProductsRow" msprop:Generator_UserRelationName="FK_ProductPartner_Products" />
+      <msdata:Relationship name="FK_Products_TypeProduct" msdata:parent="TypeProduct" msdata:child="Products" msdata:parentkey="idTypeProduct" msdata:childkey="idTypeProduct" msprop:Generator_UserParentTable="TypeProduct" msprop:Generator_UserChildTable="Products" msprop:Generator_RelationVarName="relationFK_Products_TypeProduct" msprop:Generator_ChildPropName="GetProductsRows" msprop:Generator_ParentPropName="TypeProductRow" msprop:Generator_UserRelationName="FK_Products_TypeProduct" />
     </xs:appinfo>
     </xs:appinfo>
   </xs:annotation>
   </xs:annotation>
 </xs:schema>
 </xs:schema>

+ 21 - 20
СУБД Альфапол/dbAlphapolAGDataSet.xss

@@ -4,22 +4,23 @@
      Changes to this file may cause incorrect behavior and will be lost if
      Changes to this file may cause incorrect behavior and will be lost if
      the code is regenerated.
      the code is regenerated.
 </autogenerated>-->
 </autogenerated>-->
-<DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="299" ViewPortY="-47" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
+<DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-47" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
   <Shapes>
   <Shapes>
-    <Shape ID="DesignTable:City" ZOrder="19" X="327" Y="70" Height="115" Width="167" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
-    <Shape ID="DesignTable:IndexPartner" ZOrder="18" X="327" Y="255" Height="115" Width="220" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
-    <Shape ID="DesignTable:Manager" ZOrder="17" X="1185" Y="70" Height="210" Width="196" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
-    <Shape ID="DesignTable:Partner" ZOrder="16" X="70" Y="70" Height="305" Width="187" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
-    <Shape ID="DesignTable:ProductPartner" ZOrder="15" X="327" Y="995" Height="172" Width="233" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
-    <Shape ID="DesignTable:Products" ZOrder="14" X="630" Y="995" Height="172" Width="196" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
-    <Shape ID="DesignTable:Region" ZOrder="13" X="327" Y="440" Height="115" Width="185" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
-    <Shape ID="DesignTable:Street" ZOrder="12" X="327" Y="625" Height="115" Width="179" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
-    <Shape ID="DesignTable:TypeMaterial" ZOrder="11" X="1451" Y="70" Height="134" Width="221" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
-    <Shape ID="DesignTable:TypePartner" ZOrder="10" X="327" Y="810" Height="115" Width="216" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
-    <Shape ID="DesignTable:TypeProduct" ZOrder="9" X="896" Y="995" Height="134" Width="219" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
+    <Shape ID="DesignTable:City" ZOrder="20" X="327" Y="70" Height="115" Width="167" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
+    <Shape ID="DesignTable:IndexPartner" ZOrder="19" X="327" Y="255" Height="115" Width="220" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
+    <Shape ID="DesignTable:Manager" ZOrder="18" X="1185" Y="70" Height="210" Width="196" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
+    <Shape ID="DesignTable:Partner" ZOrder="17" X="70" Y="70" Height="305" Width="187" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
+    <Shape ID="DesignTable:ProductPartner" ZOrder="16" X="327" Y="995" Height="172" Width="233" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
+    <Shape ID="DesignTable:Products" ZOrder="15" X="630" Y="995" Height="172" Width="196" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" />
+    <Shape ID="DesignTable:Region" ZOrder="14" X="327" Y="440" Height="115" Width="185" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
+    <Shape ID="DesignTable:Street" ZOrder="13" X="327" Y="625" Height="115" Width="179" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
+    <Shape ID="DesignTable:TypeMaterial" ZOrder="12" X="1451" Y="70" Height="134" Width="221" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
+    <Shape ID="DesignTable:TypePartner" ZOrder="11" X="327" Y="810" Height="115" Width="216" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
+    <Shape ID="DesignTable:TypeProduct" ZOrder="10" X="896" Y="995" Height="134" Width="219" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
+    <Shape ID="DesignTable:TypeForFilter" ZOrder="1" X="824" Y="226" Height="96" Width="210" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="46" />
   </Shapes>
   </Shapes>
   <Connectors>
   <Connectors>
-    <Connector ID="DesignRelation:FK_Partner_City" ZOrder="8" LineWidth="11">
+    <Connector ID="DesignRelation:FK_Partner_City" ZOrder="9" LineWidth="11">
       <RoutePoints>
       <RoutePoints>
         <Point>
         <Point>
           <X>327</X>
           <X>327</X>
@@ -31,7 +32,7 @@
         </Point>
         </Point>
       </RoutePoints>
       </RoutePoints>
     </Connector>
     </Connector>
-    <Connector ID="DesignRelation:FK_Partner_IndexPartner" ZOrder="7" LineWidth="11">
+    <Connector ID="DesignRelation:FK_Partner_IndexPartner" ZOrder="8" LineWidth="11">
       <RoutePoints>
       <RoutePoints>
         <Point>
         <Point>
           <X>327</X>
           <X>327</X>
@@ -43,7 +44,7 @@
         </Point>
         </Point>
       </RoutePoints>
       </RoutePoints>
     </Connector>
     </Connector>
-    <Connector ID="DesignRelation:FK_Partner_Region" ZOrder="6" LineWidth="11">
+    <Connector ID="DesignRelation:FK_Partner_Region" ZOrder="7" LineWidth="11">
       <RoutePoints>
       <RoutePoints>
         <Point>
         <Point>
           <X>327</X>
           <X>327</X>
@@ -59,7 +60,7 @@
         </Point>
         </Point>
       </RoutePoints>
       </RoutePoints>
     </Connector>
     </Connector>
-    <Connector ID="DesignRelation:FK_Partner_Street" ZOrder="5" LineWidth="11">
+    <Connector ID="DesignRelation:FK_Partner_Street" ZOrder="6" LineWidth="11">
       <RoutePoints>
       <RoutePoints>
         <Point>
         <Point>
           <X>327</X>
           <X>327</X>
@@ -75,7 +76,7 @@
         </Point>
         </Point>
       </RoutePoints>
       </RoutePoints>
     </Connector>
     </Connector>
-    <Connector ID="DesignRelation:FK_Partner_TypePartner" ZOrder="4" LineWidth="11">
+    <Connector ID="DesignRelation:FK_Partner_TypePartner" ZOrder="5" LineWidth="11">
       <RoutePoints>
       <RoutePoints>
         <Point>
         <Point>
           <X>327</X>
           <X>327</X>
@@ -91,7 +92,7 @@
         </Point>
         </Point>
       </RoutePoints>
       </RoutePoints>
     </Connector>
     </Connector>
-    <Connector ID="DesignRelation:FK_ProductPartner_Partner" ZOrder="3" LineWidth="11">
+    <Connector ID="DesignRelation:FK_ProductPartner_Partner" ZOrder="4" LineWidth="11">
       <RoutePoints>
       <RoutePoints>
         <Point>
         <Point>
           <X>216</X>
           <X>216</X>
@@ -107,7 +108,7 @@
         </Point>
         </Point>
       </RoutePoints>
       </RoutePoints>
     </Connector>
     </Connector>
-    <Connector ID="DesignRelation:FK_ProductPartner_Products" ZOrder="2" LineWidth="11">
+    <Connector ID="DesignRelation:FK_ProductPartner_Products" ZOrder="3" LineWidth="11">
       <RoutePoints>
       <RoutePoints>
         <Point>
         <Point>
           <X>630</X>
           <X>630</X>
@@ -119,7 +120,7 @@
         </Point>
         </Point>
       </RoutePoints>
       </RoutePoints>
     </Connector>
     </Connector>
-    <Connector ID="DesignRelation:FK_Products_TypeProduct" ZOrder="1" LineWidth="11">
+    <Connector ID="DesignRelation:FK_Products_TypeProduct" ZOrder="2" LineWidth="11">
       <RoutePoints>
       <RoutePoints>
         <Point>
         <Point>
           <X>896</X>
           <X>896</X>