private ConsumeCardEntity parseCard(bool beep)
        {
            uint[] array = readCard(beep);
            this.arrayReadCard = array;
            if (array != null && getCardType(array[0]) == 1U)
            {
                if (getCardAreaId(array[0]).CompareTo(ConvertUtils.ToUInt32(this.areaId, 10)) != 0)
                {
                    WMMessageBox.Show(this, "区域ID不匹配!");
                    this.ReaderOk = false;
                    return(null);
                }
                ConsumeCardEntity consumeCardEntity = new ConsumeCardEntity();
                consumeCardEntity.parseEntity(array);
                DbUtil dbUtil = new DbUtil();
                dbUtil.AddParameter("userId", ConvertUtils.ToInt64(consumeCardEntity.UserId).ToString());
                DataRow dataRow = dbUtil.ExecuteRow("SELECT * FROM cardData WHERE userId=@userId");
                this.cardData = dataRow;
                if (dataRow != null && (ulong)getCardID() != (ulong)(Convert.ToInt64(dataRow[2])))
                {
                    WMMessageBox.Show(this, "此卡为挂失卡或者其他用户卡!");
                    this.ReaderOk = false;
                    return(null);
                }
                return(consumeCardEntity);
            }
            else if (array != null)
            {
                WMMessageBox.Show(this, "此卡为其他卡片类型!");
                this.ReaderOk = false;
            }

            return(null);
        }
 // Token: 0x06000393 RID: 915 RVA: 0x0002961C File Offset: 0x0002781C
 private ConsumeCardEntity parseCard(bool beep)
 {
     if (this.parentForm != null)
     {
         uint[] array = this.parentForm.readCard(beep);
         if (array != null && this.parentForm.getCardType(array[0]) == 1U)
         {
             if (this.parentForm.getCardAreaId(array[0]).CompareTo(ConvertUtils.ToUInt32(this.parentForm.getSettings()[0])) != 0)
             {
                 WMMessageBox.Show(this, "区域ID不匹配!");
                 return(null);
             }
             ConsumeCardEntity consumeCardEntity = new ConsumeCardEntity();
             consumeCardEntity.parseEntity(array);
             this.db.AddParameter("userId", ConvertUtils.ToInt64(consumeCardEntity.UserId).ToString());
             DataRow dataRow = this.db.ExecuteRow("SELECT * FROM cardData WHERE userId=@userId");
             if (dataRow != null && (ulong)this.parentForm.getCardID() != (ulong)(Convert.ToInt64(dataRow[2])))
             {
                 WMMessageBox.Show(this, "此卡为挂失卡或者其他用户卡!");
                 return(null);
             }
             return(consumeCardEntity);
         }
         else if (array != null)
         {
             WMMessageBox.Show(this, "此卡为其他卡片类型!");
         }
     }
     return(null);
 }
 // Token: 0x060003A5 RID: 933 RVA: 0x0002B970 File Offset: 0x00029B70
 private ConsumeCardEntity parseCard(bool beep, uint cardType)
 {
     if (this.parentForm != null)
     {
         uint[] array = this.parentForm.readCard(beep);
         if (array != null && this.parentForm.getCardType(array[0]) == cardType)
         {
             if (this.parentForm.getCardAreaId(array[0]).CompareTo(ConvertUtils.ToUInt32(this.parentForm.getSettings()[0], 10)) != 0)
             {
                 WMMessageBox.Show(this, "区域ID不匹配!");
                 return(null);
             }
             ConsumeCardEntity consumeCardEntity = new ConsumeCardEntity();
             consumeCardEntity.parseEntity(array);
             return(consumeCardEntity);
         }
         else if (array != null)
         {
             WMMessageBox.Show(this, "此卡为其他卡片类型!");
         }
     }
     return(null);
 }
        // Token: 0x0600038B RID: 907 RVA: 0x00028DDC File Offset: 0x00026FDC
        private void readCardBtn_Click(object sender, EventArgs e)
        {
            if (this.parentForm.isEmptyCard())
            {
                this.messageRichTextBox.Text = "空白卡";
                return;
            }
            uint[] array = this.parentForm.readCard();
            if (array != null)
            {
                string text     = "";
                uint   cardType = this.parentForm.getCardType(array[0]);
                uint   num      = cardType;
                switch (num)
                {
                case 1U:
                {
                    ConsumeCardEntity consumeCardEntity = new ConsumeCardEntity();
                    consumeCardEntity.parseEntity(array);
                    string value  = string.Concat(consumeCardEntity.UserId);
                    DbUtil dbUtil = new DbUtil();
                    dbUtil.AddParameter("userId", value);
                    DataRow dataRow = dbUtil.ExecuteRow("SELECT * FROM metersTable WHERE meterId=@userId");
                    if (dataRow == null)
                    {
                        WMMessageBox.Show(this, "没有找到相应的表信息!");
                    }
                    else
                    {
                        dbUtil.AddParameter("permanentUserId", dataRow["permanentUserId"].ToString());
                        DataRow dataRow2 = dbUtil.ExecuteRow("SELECT * FROM usersTable WHERE permanentUserId=@permanentUserId");
                        if (dataRow2 != null)
                        {
                            text = string.Concat(new string[]
                                {
                                    "设备号:",
                                    dataRow2["userId"].ToString(),
                                    "\n姓名:",
                                    dataRow2["username"].ToString(),
                                    "\n联系方式:",
                                    dataRow2["phoneNum"].ToString(),
                                    "\n证件号码:",
                                    dataRow2["identityId"].ToString(),
                                    "\n地址:",
                                    dataRow2["address"].ToString(),
                                    "\n用户面积:",
                                    dataRow2["userArea"].ToString(),
                                    "\n人口数:",
                                    dataRow2["userPersons"].ToString()
                                });
                        }
                    }
                    text = text + "\n\n" + consumeCardEntity.ToString();
                    goto IL_2A5;
                }

                case 2U:
                {
                    TransCardEntity transCardEntity = new TransCardEntity();
                    transCardEntity.parseEntity(array);
                    text = transCardEntity.ToString();
                    goto IL_2A5;
                }

                case 3U:
                {
                    RefundCardEntity refundCardEntity = new RefundCardEntity();
                    refundCardEntity.parseEntity(array);
                    text = refundCardEntity.ToString();
                    goto IL_2A5;
                }

                case 4U:
                {
                    SettingCardEntity settingCardEntity = new SettingCardEntity();
                    settingCardEntity.parseEntity(array);
                    text = settingCardEntity.ToString();
                    goto IL_2A5;
                }

                case 5U:
                {
                    ClearCardEntity clearCardEntity = new ClearCardEntity();
                    clearCardEntity.parseEntity(array);
                    text = clearCardEntity.ToString();
                    goto IL_2A5;
                }

                case 6U:
                    break;

                case 7U:
                case 8U:
                {
                    ForceValveOperationCardEntity forceValveOperationCardEntity = new ForceValveOperationCardEntity();
                    forceValveOperationCardEntity.parseEntity(array);
                    text = forceValveOperationCardEntity.ToString();
                    goto IL_2A5;
                }

                default:
                    if (num != 31U)
                    {
                        goto IL_2A5;
                    }
                    break;
                }
                CheckCardEntityV3 checkCardEntityV = new CheckCardEntityV3();
                checkCardEntityV.parseEntity(array);
                text = checkCardEntityV.ToString();
IL_2A5:
                this.messageRichTextBox.Text = text;
            }
        }