private void button1_Click(object sender, EventArgs e) { int a = 0; if (textBox1.Text != "" && textBox2.Text != "") { if (textBox1.Text == "admin" && textBox2.Text == "yravn") { Form4 f2 = new Form4(); f2.Show(); textBox1.Text = ""; textBox2.Text = ""; this.Hide(); } else { for (int i = 0; i < dataGridView1.RowCount; i++) { if (dataGridView1[0, i].FormattedValue.ToString() == textBox1.Text && dataGridView1[1, i].FormattedValue.ToString() == textBox2.Text) { a = 1; MessageBox.Show("Вход успешен"); Form7 f7 = new Form7(); Form3 f2 = new Form3(); if (dataGridView1[5, i].FormattedValue.ToString() != "Пользователь") { f7.Show(); } else { f2.Show(); } f2.label3.Text = textBox1.Text; textBox1.Text = ""; textBox2.Text = ""; this.Hide(); break; } } if (a == 0) { MessageBox.Show("Вы ввели неверные данные"); } } } else { MessageBox.Show("Вы не ввели данные"); } }
private void button6_Click(object sender, EventArgs e) { Form fm6 = new Form7(); fm6.Show(); }
private void 房间信息ToolStripMenuItem_Click(object sender, EventArgs e) { Form7 form7 = new Form7(); form7.Show(); }
private void x2ToolStripMenuItem_Click(object sender, EventArgs e) { Form na2 = new Form7(); na2.Show(); }