Beispiel #1
0
 public static MakeCardProcess2 GetObject()
 {
     if (self == null)
     {
         self = new MakeCardProcess2();
     }
     return(self);
 }
Beispiel #2
0
        //2.加载数据
        async private void LoadData()
        {
            BackExit.setBack(LoadData);
            index = 0;

            timeTag = CD.timeTag.updateTag();
            if (CD.business2 == null)
            {
                CD.business2 = new Business2();
            }
            CD.setMainUI(CD.business2);
            CD.business2.start();

            Loading.show2("正在查询,请稍候...");
            tools.AnalyzeJson retJson = null;
            await TaskMore.Run(new Action(() => {
                MakeJson json = new MakeJson();
                json.add("fkcs", Config.dic("cityCode"));
                json.add("shbzh", ReadIDCar.persionid);
                json.add("xm", ReadIDCar.name);
                //ppid String  是 由肇庆市社保局提供
                //appkey String  是 由肇庆市社保局提供
                retJson = Post.Post_Json("getCardProgress", json.ToString());
            })).ConfigureAwait(true);

            if (retJson.error != null)
            {
                ShowTip.show(false, BackExit.Exit, retJson.error);
            }
            else
            {
                if (retJson["data"]["err"].ToString() != "OK")
                {
                    ShowTip.show(false, BackExit.Exit, retJson["data"]["err"].ToString());
                    return;
                }
                if (retJson["data"]["validtag"].ToString().Trim().IndexOf("-") == 0)
                {
                    error.Text = "制卡失败:" + retJson["data"]["remarks"].ToString();
                }
                else
                {
                    error.Text = "";
                }

                times[0].Text = handleTimeStr(retJson["data"]["applytime"].ToString());
                times[1].Text = handleTimeStr(retJson["data"]["banktime"].ToString());
                times[2].Text = handleTimeStr(retJson["data"]["kszkhpsj"].ToString());
                times[3].Text = handleTimeStr(retJson["data"]["provincetime"].ToString());
                times[4].Text = handleTimeStr(retJson["data"]["citytime"].ToString());
                times[5].Text = handleTimeStr(retJson["data"]["gettime"].ToString());
                times[6].Text = handleTimeStr(retJson["data"]["yhjhtime"].ToString());

                if (times[0].Text == "")
                {
                    CD.business2.setBusinessValue(MakeCardProcess2.GetObject());
                    return;
                }

                if (times[4].Text != "")
                {
                    T52.Text = "(" + retJson["data"]["lkjgmc"].ToString() + ")";
                }
                else
                {
                    T52.Text = "";
                }

                index = 0;
                for (int i = 0; i < times.Count; i++)
                {
                    if (times[i].Text == "")
                    {
                        break;
                    }
                    index++;
                }

                showResult();
            }
        }