private void Login_Click(object sender, EventArgs e) { string strAccount = tbAccount.Text; string strPassword = tbPassword.Text; if (strPassword == "Password") { strPassword = string.Empty; } if (strAccount == "Account" || strAccount.Length == 0) { MessageBox.Show("帐号不能为空", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (strAccount.ToUpper() != "ADMIN") { if (strPassword.Length == 0) { MessageBox.Show("密码不能为空", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } IAdminInfoService adminInfoService = BLL.Container.Container.Resolve <IAdminInfoService>(); AdminInfo adminInfo = adminInfoService.Query(strAccount, strPassword); if (adminInfo == null) { MessageBox.Show("帐号或密码错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } this.Tag = adminInfo; this.DialogResult = DialogResult.OK; }
public DashboardController(IAdminInfoService adminInfoService) { this.adminInfoService = adminInfoService; }
public AdminInfoController(IAdminInfoService iAdminInfoService) { _iAdminInfoService = iAdminInfoService; }