Exemplo n.º 1
0
 private void bgLogin_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (string.IsNullOrEmpty(GlobalData.OperatorID))
     {
         CommonFunc.LoadMsg("用户名密码错误!");
         btnOK.Enabled = true;
         return;
     }
     else
     {
         this.Close();
     }
 }
Exemplo n.º 2
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            string sPassword  = tb_Password.Text;
            string sLoginName = tb_UserName.Text;

            if (string.IsNullOrEmpty(sLoginName))
            {
                CommonFunc.LoadMsg("请输入用户名");
                return;
            }

            if (string.IsNullOrEmpty(sPassword))
            {
                CommonFunc.LoadMsg("请输入密码");
                return;
            }

            btnOK.Enabled = false;
            bgLogin.RunWorkerAsync();
        }