예제 #1
0
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Longin_Click(object sender, EventArgs e)
        {
            User loginUser = new User();

            loginUser.LoginId  = txtLoginId.Text.Trim();
            loginUser.LoginPwd = txtPwd.Text.Trim();

            if (user_bll.CountUser(loginUser) > 0)
            {
                DialogResult  = DialogResult.OK;
                Frm_Main.user = loginUser;
            }
            else
            {
                DialogResult = DialogResult.Cancel;
                MessageBox.Show("登录失败!");
            }
        }