Browse Source

форма3 подключенны текстбоксы

Kuzmenco 1 year ago
parent
commit
bb0d28e807
5 changed files with 131 additions and 3 deletions
  1. 77 2
      Form2.Designer.cs
  2. 11 0
      Form2.cs
  3. 27 0
      Form2.resx
  4. 2 1
      Form3.Designer.cs
  5. 14 0
      Form3.cs

+ 77 - 2
Form2.Designer.cs

@@ -29,13 +29,24 @@ namespace ПрокатАвто03
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             this.label1 = new System.Windows.Forms.Label();
             this.dataGridView1 = new System.Windows.Forms.DataGridView();
             this.button1 = new System.Windows.Forms.Button();
             this.button2 = new System.Windows.Forms.Button();
             this.button3 = new System.Windows.Forms.Button();
             this.button4 = new System.Windows.Forms.Button();
+            this.Модель = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Цвет = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Год_выпуска = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Госномер = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Страховка = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Стоимость_дня_проката = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.prokatavto03DataSet = new ПрокатАвто03.Prokatavto03DataSet();
+            this.prokatavto03DataSetBindingSource = new System.Windows.Forms.BindingSource(this.components);
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.prokatavto03DataSet)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.prokatavto03DataSetBindingSource)).BeginInit();
             this.SuspendLayout();
             // 
             // label1
@@ -51,11 +62,24 @@ namespace ПрокатАвто03
             // 
             // dataGridView1
             // 
+            this.dataGridView1.AllowUserToAddRows = false;
+            this.dataGridView1.AllowUserToDeleteRows = false;
+            this.dataGridView1.AutoGenerateColumns = false;
             this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Модель,
+            this.Цвет,
+            this.Год_выпуска,
+            this.Госномер,
+            this.Страховка,
+            this.Стоимость_дня_проката});
+            this.dataGridView1.DataSource = this.prokatavto03DataSetBindingSource;
             this.dataGridView1.Location = new System.Drawing.Point(42, 38);
             this.dataGridView1.Name = "dataGridView1";
-            this.dataGridView1.Size = new System.Drawing.Size(467, 188);
+            this.dataGridView1.ReadOnly = true;
+            this.dataGridView1.Size = new System.Drawing.Size(644, 164);
             this.dataGridView1.TabIndex = 1;
+            this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
             // 
             // button1
             // 
@@ -87,6 +111,7 @@ namespace ПрокатАвто03
             this.button3.TabIndex = 4;
             this.button3.Text = "редактирование";
             this.button3.UseVisualStyleBackColor = true;
+            this.button3.Click += new System.EventHandler(this.button3_Click);
             // 
             // button4
             // 
@@ -99,12 +124,52 @@ namespace ПрокатАвто03
             this.button4.UseVisualStyleBackColor = true;
             this.button4.Click += new System.EventHandler(this.button4_Click);
             // 
+            // Модель
+            // 
+            this.Модель.HeaderText = "Модель";
+            this.Модель.Name = "Модель";
+            // 
+            // Цвет
+            // 
+            this.Цвет.HeaderText = "Цвет";
+            this.Цвет.Name = "Цвет";
+            // 
+            // Год_выпуска
+            // 
+            this.Год_выпуска.HeaderText = "Год выпуска";
+            this.Год_выпуска.Name = "Год_выпуска";
+            // 
+            // Госномер
+            // 
+            this.Госномер.HeaderText = "Госномер";
+            this.Госномер.Name = "Госномер";
+            // 
+            // Страховка
+            // 
+            this.Страховка.HeaderText = "Страховая стоимость";
+            this.Страховка.Name = "Страховка";
+            // 
+            // Стоимость_дня_проката
+            // 
+            this.Стоимость_дня_проката.HeaderText = "Стоимость одного дня проката";
+            this.Стоимость_дня_проката.Name = "Стоимость_дня_проката";
+            // 
+            // prokatavto03DataSet
+            // 
+            this.prokatavto03DataSet.DataSetName = "Prokatavto03DataSet";
+            this.prokatavto03DataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
+            // 
+            // prokatavto03DataSetBindingSource
+            // 
+            this.prokatavto03DataSetBindingSource.DataSource = this.prokatavto03DataSet;
+            this.prokatavto03DataSetBindingSource.Position = 0;
+            // 
             // Form2
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Teal;
-            this.ClientSize = new System.Drawing.Size(545, 284);
+            this.ClientSize = new System.Drawing.Size(807, 296);
             this.Controls.Add(this.button4);
             this.Controls.Add(this.button3);
             this.Controls.Add(this.button2);
@@ -114,6 +179,8 @@ namespace ПрокатАвто03
             this.Name = "Form2";
             this.Text = "Список автомобилей";
             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.prokatavto03DataSet)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.prokatavto03DataSetBindingSource)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -127,5 +194,13 @@ namespace ПрокатАвто03
         private System.Windows.Forms.Button button2;
         private System.Windows.Forms.Button button3;
         private System.Windows.Forms.Button button4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Модель;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Цвет;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Год_выпуска;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Госномер;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Страховка;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Стоимость_дня_проката;
+        private System.Windows.Forms.BindingSource prokatavto03DataSetBindingSource;
+        private Prokatavto03DataSet prokatavto03DataSet;
     }
 }

+ 11 - 0
Form2.cs

@@ -35,5 +35,16 @@ namespace ПрокатАвто03
             fr3.Show();
            
         }
+
+        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+            
+        }
+
+        private void button3_Click(object sender, EventArgs e)
+        {
+            Form3 fr3 = new Form3();
+            fr3.Show();
+        }
     }
 }

+ 27 - 0
Form2.resx

@@ -117,4 +117,31 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="Модель.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Цвет.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Год_выпуска.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Госномер.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Страховка.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Стоимость_дня_проката.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="prokatavto03DataSetBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>184, 17</value>
+  </metadata>
+  <metadata name="prokatavto03DataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="prokatavto03DataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>

+ 2 - 1
Form3.Designer.cs

@@ -150,7 +150,7 @@ namespace ПрокатАвто03
             // button1
             // 
             this.button1.Font = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
-            this.button1.Location = new System.Drawing.Point(184, 274);
+            this.button1.Location = new System.Drawing.Point(286, 274);
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(140, 40);
             this.button1.TabIndex = 12;
@@ -178,6 +178,7 @@ namespace ПрокатАвто03
             this.Controls.Add(this.label1);
             this.Name = "Form3";
             this.Text = "Добавление Данных про автомобиль";
+            this.Load += new System.EventHandler(this.Form3_Load);
             this.ResumeLayout(false);
             this.PerformLayout();
 

+ 14 - 0
Form3.cs

@@ -20,6 +20,20 @@ namespace ПрокатАвто03
         private void label3_Click(object sender, EventArgs e)
         {
 
+        }
+
+        private void Form3_Load(object sender, EventArgs e)
+        {
+            string Модель = textBox1.Text;
+            string Цвет = textBox2.Text;
+            string Год_выпуска = textBox3.Text;
+            string Госномер = textBox4.Text;
+            string Страховка = textBox5.Text;
+            string Стоимость_дня_проката = textBox6.Text;
+
+
+
+
         }
     }
 }