Exemplo n.º 1
0
        private void BBI_Login_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (this.BEI_UserName.EditValue.ToString() == "" || this.BEI_PassW.EditValue.ToString() == "")
            {
                MessageBox.Show("密码和用户名不能为空!");
                return;
            }


            TxtData.XMLConfigure.Login = db.ExistUser(this.BEI_UserName.EditValue.ToString(), this.BEI_PassW.EditValue.ToString());
            if (TxtData.XMLConfigure.Login)
            {
                TxtData.XMLConfigure.User    = this.BEI_UserName.EditValue.ToString();
                TxtData.XMLConfigure.PopeDom = db.GetUserPopm(this.BEI_UserName.EditValue.ToString());
                db.EditAutoLogin(this.BEI_UserName.EditValue.ToString(), this.BEI_PassW.EditValue.ToString(), (bool)BEI_AutoLogin.EditValue);

                db.AddLog(TxtData.XMLConfigure.User + "登录");
            }
            else
            {
                MessageBox.Show("登录失败!");
                this.RC_Main.Minimized = false;
            }
        }