Ejemplo n.º 1
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (txtCard.Text.Trim() == "")
     {
         epMessage.SetError(txtCard, "请刷入卡号或姓名!");
         return;
     }
     if (txtPwd.Text.Trim() == "")
     {
         epMessage.SetError(txtPwd, "请输入密码!");
         return;
     }
     if (isVip)
     {
         vipInfo.VipNumber = txtCard.Text.Trim();
         vipInfo.VipPWD    = txtPwd.Text.Trim();
         vipInfo           = vipBLL.VipCheck(vipInfo);
         if (vipInfo.VipId == 0)
         {
             MessageBox.Show("租车密码与卡号不相符!");
         }
         else
         {
             isTrue = true;
             vipId  = vipInfo.VipId;
             this.Close();
         }
     }
     else
     {
         vipNoInfo.VipNumber = txtCard.Text.Trim();
         vipNoInfo.VipPwd    = txtPwd.Text.Trim();
         vipNoInfo           = vipNoBLL.VipNoCheck(vipNoInfo);
         if (vipNoInfo.VipId == 0)
         {
             MessageBox.Show("租车密码与卡号不相符!");
         }
         else
         {
             isTrue = true;
             vipId  = vipNoInfo.VipId;
             this.Close();
         }
     }
 }