public static void Show(Business2 parent, TIPSTYLE tIPSTYLE, string txt)
        {
            TH.addOnceUI(new Action(() =>
            {
                if (sst == null)
                {
                    sst = new ShowSubTip();
                }
                if (tIPSTYLE == TIPSTYLE.MachineError)
                {
                    sst.tipStyle.Source = MachineError;
                }
                else if (tIPSTYLE == TIPSTYLE.NoCar)
                {
                    sst.tipStyle.Source = NoCar;
                }
                else
                {
                    sst.tipStyle.Source = PutCarOutFailed;
                }
                sst.error.Text = txt;

                if (tIPSTYLE != TIPSTYLE.MachineError)
                {
                    parent.showBackExit();
                    CD.countDownTime.stop();
                }

                parent.setBusinessValue(sst);
            }));
        }
Beispiel #2
0
 public void show()
 {
     KeyPad.startInput(KeyPad.normal_Input, KeyPad.normal_Delete, clear, ok_, null, this);
     BackExit.LetNextClickToMain();
     p1.Password = "";
     p2.Password = "";
     p3.Password = "";
     p1.Focus();
     Business2.Init("社保密码修改");
     CD.business2.setBusinessValue(this);
 }
        //2.加载数据
        async private void LoadData()
        {
            string name      = "";
            string persionid = "";

            if (SelectCard.isSelectIDCard)
            {
                name      = ReadIDCar.name;
                persionid = ReadIDCar.persionid;
            }
            else
            {
                name      = B_ReadSSCard.name;
                persionid = B_ReadSSCard.persionid;
            }


            BackExit.setBack(LoadData);
            Business2.Init("医保账户查询");

            Loading.show2("正在查询,请稍候...");
            tools.AnalyzeJson retJson1 = null;
            tools.AnalyzeJson retJson2 = null;
            await TaskMore.Run(new Action(() => {
                retJson1 = getBalance(persionid, name);
                if (retJson1.error == null)
                {
                    retJson2 = getList(persionid, name);
                }
            })).ConfigureAwait(true);

            if (retJson1.error != null)
            {
                ShowTip.show(false, BackExit.Exit, retJson1.error);
            }
            else if (retJson2.error != null)
            {
                ShowTip.show(false, BackExit.Exit, retJson2.error);
            }
            else
            {
                CD.business2.setBusinessValue(this);
                time.reset(true, false);
                string balance = retJson1["data"]["balance"].ToString();
                this.balance.Text = balance;
                setList(retJson2);
            }
        }
        /*
         *               <TextBlock>姓  名:name</TextBlock>
         *      <TextBlock>性  别:sex</TextBlock>
         *      <TextBlock>民  族:nation</TextBlock>
         *      <TextBlock>出生日期:birthday</TextBlock>
         *      <TextBlock>身份证号:shbzh</TextBlock>
         *      <TextBlock>社保卡号:sbkh</TextBlock>
         *      <TextBlock>户口性质:registtype</TextBlock>
         *      <TextBlock>电  话:telno</TextBlock>
         *      <TextBlock>手  机:mobile</TextBlock>
         *      <TextBlock>通讯地址:mailaddr</TextBlock>
         *      <TextBlock>邮  编:zipcode</TextBlock>
         *      <TextBlock>电子邮箱:email</TextBlock>
         *      <TextBlock>单位名称:dwmc</TextBlock>
         */
        async private void LoadDataAsync()
        {
            string name      = "";
            string persionid = "";

            if (SelectCard.isSelectIDCard)
            {
                name      = ReadIDCar.name;
                persionid = ReadIDCar.persionid;
            }
            else
            {
                name      = B_ReadSSCard.name;
                persionid = B_ReadSSCard.persionid;
            }

            BackExit.setBack(LoadDataAsync);
            Business2.Init("卡信息查询");

            Loading.show2("正在查询,请稍候...");
            List <Dictionary <string, string> > zkData = null;
            string error = null;
            await TaskMore.Run(new Action(() =>
            {
                if (error == null)
                {
                    zkData = WeiWang.getZKData(persionid, name, out error);
                }
            })).ConfigureAwait(true);

            if (error != null)
            {
                ShowTip.show(false, BackExit.Exit, error);
                return;
            }
            if (zkData[0]["ERR"] != "OK")
            {
                ShowTip.show(false, BackExit.Exit, zkData[0]["ERR"]);
                return;
            }
            try
            {
                for (int i = 0; i < keys.Count; i++)
                {
                    // string value = retJson["data"][keys[i]].ToString();
                    switch (keys[i])
                    {
                    case "name":
                        keys[i] = zkData[0]["AAC003"];
                        break;

                    case "sex":
                    {
                        if (zkData[0]["AAC004"] == "1" || zkData[0]["AAC004"] == "5")
                        {
                            keys[i] = "男";
                        }
                        else if (zkData[0]["AAC004"] == "2" || zkData[0]["AAC004"] == "6")
                        {
                            keys[i] = "女";
                        }
                        else
                        {
                            keys[i] = "未知";
                        }
                        break;
                    }

                    case "nation":
                        keys[i] = ReadIDCar.GetNationName(zkData[0]["AAC005"]);
                        break;

                    case "birthday":
                        keys[i] = zkData[0]["AAC006"];
                        break;

                    case "shbzh":
                        keys[i] = zkData[0]["AAC002"].Substring(0, 5) + "***********" + zkData[0]["AAC002"].Substring(zkData[0]["AAC002"].Length - 2, 2);
                        break;

                    case "sbkh":
                        keys[i] = zkData[0]["AAZ500"].Substring(0, 2) + "*******" + zkData[0]["AAZ500"].Substring(zkData[0]["AAZ500"].Length - 2, 2);
                        break;

                    case "registtype":
                        keys[i] = zkData[0]["AAC009"];
                        break;

                    case "telno":
                        keys[i] = zkData[0]["AAE005"];
                        break;

                    case "mobile":
                        keys[i] = zkData[0]["MOBILE"];
                        break;

                    case "mailaddr":
                        keys[i] = zkData[0]["AAE006"];
                        break;

                    case "zipcode":
                        keys[i] = zkData[0]["AAE007"];
                        break;

                    case "email":
                        keys[i] = zkData[0]["EMAIL"];
                        break;

                    case "dwmc":
                        keys[i] = zkData[0]["AAB004"];
                        break;
                    }
                    ctls[i].Text = names[i] + keys[i];
                }
                pic.Source = TImage.Base64ToImageSource(zkData[0]["PHOTO"].ToString());
                CD.business2.setBusinessValue(this);
            }
            catch (Exception e)
            {
                Log.AddLog("Search", e.ToString());
                ShowTip.show(false, BackExit.Exit, "数据解析异常");
            }
        }