Ejemplo n.º 1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtusercode.Text)
         || string.IsNullOrEmpty(txtpwd.Text))
     {
         MessageBox.Show("请输入用户名或密码!", "出错");
         return;
     }
     UserOR obj = new UserDA().Login(txtusercode.Text, txtpwd.Text);
     if (obj == null)
     {
         MessageBox.Show("用户名或密码错误。", "出错");
         return;
     }
     Globals.isLogin = true;
     Globals.CurrentUser = obj;
     this.Close();
 }
Ejemplo n.º 2
0
        private void loadData()
        {
            UserOR m_obj = new UserDA().selectARowDate(m_ID);

            txtUserName.Text=m_obj.UserName;
            txtAccount.Text=m_obj.UserCode;
            txtUserPwd.Text=m_obj.PWD;
        }