private void button8_Click(object sender, EventArgs e) { Form8 frm8 = new Form8(); //实例化一个子窗口 frm8.TopLevel = false; //设置子窗口不显示为顶级窗口 frm8.Dock = DockStyle.Fill; //填充 this.panel1.Controls.Clear(); //清空Panel里面的控件 this.panel1.Controls.Add(frm8); //加入控件 frm8.Show(); //让窗体显示 }
private void button1_Click(object sender, EventArgs e) { if (Form14.d == 1) { if (radioButton3.Checked == true) { Form8 form = new Form8(); form.Show(); this.Hide(); } else if (radioButton2.Checked == true) { Form12 form = new Form12(); form.Show(); this.Hide(); } else if (radioButton1.Checked == true) { Form13 form = new Form13(); form.Show(); this.Hide(); } } else if (Form14.d == 2) { if (radioButton3.Checked == true) { Form15 form = new Form15(); form.Show(); this.Hide(); } else if (radioButton2.Checked == true) { Form16 form = new Form16(); form.Show(); this.Hide(); } else if (radioButton1.Checked == true) { Form17 form = new Form17(); form.Show(); this.Hide(); } } }
private void thốngKêToolStripMenuItem_Click(object sender, EventArgs e) { bool tf = true; Form4 f = new Form4(); f.setLabel1("Mã chuyến bay "); f.setButton("Thống kê"); string Mystring = ""; while (f.ShowDialog() == DialogResult.OK) { if (f.getTB1() == "") { MessageBox.Show("Chưa điền đủ thông tin", "Title", MessageBoxButtons.OK, MessageBoxIcon.Warning); continue; } Mystring = f.getTB1(); if (check_flight_exist(obj, Mystring) == false) { MessageBox.Show("Mã chuyến bay không tồn tại", "Title", MessageBoxButtons.OK, MessageBoxIcon.Warning); tf = false; f.Close(); break; } f.Close(); break; } if (tf == false) { return; } string str = ""; passengerinfo_of_flight(obj, Mystring); using (StreamReader sr = File.OpenText("output1.txt")) { str = sr.ReadLine(); } Form8 ff = new Form8(Mystring, str); ff.Show(); }
private void button1_Click(object sender, EventArgs e) { String Login = textBox1.Text; String Pass = textBox2.Text; DB db = new DB(); DataTable table = new DataTable(); SqlDataAdapter adapter = new SqlDataAdapter(); SqlCommand command = new SqlCommand("Select * from Workers where Login = @UL AND Password = @UP", db.GetConnection()); command.Parameters.Add("@UL", SqlDbType.VarChar).Value = Login; command.Parameters.Add("@UP", SqlDbType.VarChar).Value = Pass; adapter.SelectCommand = command; adapter.Fill(table); ClientSession.UserName = textBox1.Text; if (table.Rows.Count > 0) { ClientSession.iduser = table.Rows[0][0].ToString(); string accessgroup = table.Rows[0][9].ToString(); if (accessgroup == "1") { Form8 form8 = new Form8(); form8.Show(); Hide(); } else { Form1 form1 = new Form1(); form1.Show(); Hide(); } } else { MessageBox.Show("Введен неверный логин или пароль"); } }
private void ViewAttend_Click(object sender, EventArgs e) { Form8 fm = new Form8(); fm.Show(); }
private void button17_Click(object sender, EventArgs e) { Form8 f8 = new Form8(); f8.Show(); }
private void button2_Click(object sender, EventArgs e) { Form8 fm = new Form8(); fm.Show(); }
private void button1_Click(object sender, EventArgs e) { if (sexual.SelectedIndex == 0 && st.SelectedIndex == 0) { Form2 form2 = new Form2(); this.Hide(); form2.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 1) { Form3 form3 = new Form3(); this.Hide(); form3.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 2) { Form4 form4 = new Form4(); this.Hide(); form4.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 3) { Form5 form5 = new Form5(); this.Hide(); form5.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 4) { Form6 form6 = new Form6(); this.Hide(); form6.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 5) { Form7 form7 = new Form7(); this.Hide(); form7.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 6) { Form8 form8 = new Form8(); this.Hide(); form8.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 7) { Form9 form9 = new Form9(); this.Hide(); form9.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 8) { Form10 form10 = new Form10(); this.Hide(); form10.Show(); } if (sexual.SelectedIndex == 0 && st.SelectedIndex == 9) { Form11 form11 = new Form11(); this.Hide(); form11.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 0) { Form12 form12 = new Form12(); this.Hide(); form12.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 1) { Form13 form13 = new Form13(); this.Hide(); form13.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 2) { Form14 form14 = new Form14(); this.Hide(); form14.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 3) { Form15 form15 = new Form15(); this.Hide(); form15.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 4) { Form16 form16 = new Form16(); this.Hide(); form16.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 5) { Form17 form17 = new Form17(); this.Hide(); form17.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 6) { Form18 form18 = new Form18(); this.Hide(); form18.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 7) { Form19 form19 = new Form19(); this.Hide(); form19.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 8) { Form20 form20 = new Form20(); this.Hide(); form20.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 9) { Form21 form21 = new Form21(); this.Hide(); form21.Show(); } if (sexual.SelectedIndex == 1 && st.SelectedIndex == 10) { Form22 form22 = new Form22(); this.Hide(); form22.Show(); } }
private void button26_Click(object sender, EventArgs e) { Form8 form8 = new Form8(); form8.Show(); }
private void button8_Click(object sender, EventArgs e) { var error8Form = new Form8(); error8Form.Show(); }