示例#1
0
        // Token: 0x06000450 RID: 1104 RVA: 0x000410E0 File Offset: 0x0003F2E0
        private void enterBtn_Click(object sender, EventArgs e)
        {
            this.enterBtn.Enabled = false;
            int num = this.parentForm.isValidCard();

            if (num == 1)
            {
                WMMessageBox.Show(this, "空卡!");
                return;
            }
            if (num != 2)
            {
                WMMessageBox.Show(this, "无效卡!");
                return;
            }
            if (!this.parentForm.isVaildTypeCard(1U))
            {
                WMMessageBox.Show(this, "其他卡类型,请检查重试!");
                return;
            }
            RefundCardEntity refundCardEntity = new RefundCardEntity();

            refundCardEntity.CardHead = this.getCardHeadEntity();
            if (this.parentForm != null)
            {
                this.parentForm.writeCard(refundCardEntity.getEntity());
            }
        }
示例#2
0
        // 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;
            }
        }