user2 4 years ago
parent
commit
ec34b35e0d
4 changed files with 15 additions and 2 deletions
  1. 2 0
      konkurs/Form1.cs
  2. 3 2
      konkurs/Form3.Designer.cs
  3. 7 0
      konkurs/Form3.cs
  4. 3 0
      konkurs/Form3.resx

+ 2 - 0
konkurs/Form1.cs

@@ -46,11 +46,13 @@ namespace konkurs
                     {
                         Form2 fr2 = new Form2();
                         fr2.Show();
+                        this.Hide();
                     }
                     if (sqlReader["manager"].ToString() == "1")
                     {
                         Form3 fr3 = new Form3();
                         fr3.Show();
+                        this.Hide();
                     }
                 }
                 

+ 3 - 2
konkurs/Form3.Designer.cs

@@ -95,7 +95,7 @@
             this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
             this.tabPage1.Size = new System.Drawing.Size(1019, 475);
             this.tabPage1.TabIndex = 0;
-            this.tabPage1.Text = "tabPage1";
+            this.tabPage1.Text = "Номера";
             this.tabPage1.UseVisualStyleBackColor = true;
             // 
             // tabPage2
@@ -106,7 +106,7 @@
             this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
             this.tabPage2.Size = new System.Drawing.Size(1019, 475);
             this.tabPage2.TabIndex = 1;
-            this.tabPage2.Text = "tabPage2";
+            this.tabPage2.Text = "Бронирование";
             this.tabPage2.UseVisualStyleBackColor = true;
             // 
             // dataGridView1
@@ -238,6 +238,7 @@
             this.Controls.Add(this.tabControl1);
             this.Name = "Form3";
             this.Text = "Form3";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form3_FormClosing);
             this.Load += new System.EventHandler(this.Form3_Load);
             ((System.ComponentModel.ISupportInitialize)(this.konkursDataSet)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.bronirovenieBindingSource)).EndInit();

+ 7 - 0
konkurs/Form3.cs

@@ -28,6 +28,13 @@ namespace konkurs
 
         private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
         {
+            
+        }
+
+        private void Form3_FormClosing(object sender, FormClosingEventArgs e)
+        {
+
+            Application.Exit();
 
         }
     }

+ 3 - 0
konkurs/Form3.resx

@@ -132,6 +132,9 @@
   <metadata name="konkursDataSet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>548, 17</value>
   </metadata>
+  <metadata name="komfortBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>692, 17</value>
+  </metadata>
   <metadata name="komfortTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>866, 17</value>
   </metadata>