private void button1_Click(object sender, EventArgs e) { if (DAO.login(thisname, thispassword) == 2) { MessageBox.Show("不存在该用户"); } else if (DAO.login(thisname, thispassword) == 3) { MessageBox.Show("用户名密码有误请重新输入!"); } else if (DAO.login(thisname, thispassword) == 4) { MessageBox.Show("异常!"); } else { MessageBox.Show("成功登陆!"); MainFrame1 m1 = new MainFrame1(thisname); m1.Show(); this.Visible = false; } }
public MainFrame2(Account a2, MainFrame1 form1) { this.a1 = a2; InitializeComponent(); _mainform1 = form1; }
public MainFrame3(string usernameValue, MainFrame1 form1) { u1.Username = usernameValue; InitializeComponent(); _mainform1 = form1; }