Part1-表示层
private void btnLogin_Click(object sender, EventArgs e)
{
string username = txtName.Text.Trim();//用户登录信息
if (txtName.Text == "" || txtPassword.Text == "")
{
MessageBox.Show("登录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
{
UserBLL bll = new UserBLL();
bool success = bll.login(username, txtPassword.Text);
if (success == true)
{
AccountInfo.Username = username;
formMain fM = new formMain();
fM.Show();
this.Hide();
}
else
{