Example #1
0
        private async void UpdateTable()
        {
            var p = await InvestPersons.BankInfo(m_auId);

            if (p.IsOk)
            {
                var d            = p.AsDictionary;
                var name         = d.GetOrDefault <string>("name");
                var mobile       = d.GetOrDefault <string>("mobile");
                var idCard       = d.GetOrDefault <string>("idCard");
                var reCard       = d.GetOrDefault <string>("reCard");
                var userId       = d.GetOrDefault <string>("userId");
                var datePoint    = Commons.TimestampToDateString(d.GetOrDefault <long>("datePoint"));
                var visibleBal   = string.Format("{0:#,##0.00}", d.GetOrDefault <decimal>("visibleBal"));
                var availableBal = string.Format("{0:#,##0.00}", d.GetOrDefault <decimal>("availableBal"));
                var isPwdSet     = d.GetOrDefault <bool>("isPwdSet") ? "是" : "否";

                m_bankInfo = new BankInfoProperties(name, mobile, idCard, reCard, userId, datePoint, visibleBal, availableBal, isPwdSet);
                propertyGrid1.SelectedObject = m_bankInfo;
            }
            else
            {
                Commons.ShowResultErrorBox(this, p);
            }
        }
Example #2
0
        public static string ToDate(this JToken j)
        {
            string s = j.ToStdString();

            if (!string.IsNullOrEmpty(s))
            {
                long d;
                if (long.TryParse(s, out d))
                {
                    return(Commons.TimestampToDateString(d));
                }
            }
            return("");
        }
Example #3
0
        private async void UpdateTable()
        {
            var p = await Wyjks.GetFinacierDetails(m_fId);

            if (p.IsOk)
            {
                var d = p.AsDictionary;

                tbName.Text          = d.GetOrDefault <string>("name");
                tbEmail.Text         = d.GetOrDefault <string>("email");
                tbAddress.Text       = d.GetOrDefault <string>("address");
                tbSrc.Text           = d.GetOrDefault <string>("src");
                tbOrgCode.Text       = d.GetOrDefault <string>("orgCode");
                tbLinkManName.Text   = d.GetOrDefault <string>("linkmanName");
                tbLinkManMobile.Text = d.GetOrDefault <string>("linkmanMobile");
                tbLinkManQQ.Text     = d.GetOrDefault <string>("linkmanQq");
                tbLinkManWeChat.Text = d.GetOrDefault <string>("linkmanWchat");


                tbAmt.Text         = d.GetOrDefault <string>("amt");
                tbStartTime.Text   = Commons.TimestampToDateString(d.GetOrDefault <long>("startTime"));
                tbEndTime.Text     = Commons.TimestampToDateString(d.GetOrDefault <long>("endTime"));
                tbLoanPurpose.Text = d.GetOrDefault <string>("loanPurpose");

                int num = d.GetOrDefault <int>("guaranteeScheme");
                for (int i = 0; i < m_ckbPlans.Count; ++i)
                {
                    m_ckbPlans[i].Item2.Checked = Convert.ToBoolean(num & m_ckbPlans[i].Item1);
                }

                tbGuaranteeName.Text        = d.GetOrDefault <string>("guaranteeName");
                tbPayerName.Text            = d.GetOrDefault <string>("payerName");
                tbDrawerName.Text           = d.GetOrDefault <string>("drawerName");
                tbOtherGuaranteeScheme.Text = d.GetOrDefault <string>("otherGuaranteeScheme");
                tbOtherInfo.Text            = d.GetOrDefault <string>("otherInfo");

                tbCreateTime.Text   = Commons.TimestampToDateString(d.GetOrDefault <long>("createTime"));
                tbAssignerName.Text = d.GetOrDefault <string>("assignerName");
                tbAssigneTime.Text  = Commons.TimestampToDateString(d.GetOrDefault <long>("assigneTime"));
                tbUpdater.Text      = d.GetOrDefault <string>("updater");
                tbUpdateTime.Text   = Commons.TimestampToDateString(d.GetOrDefault <long>("updateTime"));
                tbTrackerName.Text  = d.GetOrDefault <string>("trackerName");
                tbStatus.Text       = INACIERSTATUS.FindByValue(d.GetOrDefault <string>("status"));
                tbInfoFeedBack.Text = d.GetOrDefault <string>("infoFeedback");
            }
            else
            {
                Commons.ShowResultErrorBox(this, p);
            }
        }
Example #4
0
        private async void UpdateTable()
        {
            var p = await InvestOrgs.Account(m_auId);

            if (p.IsOk)
            {
                var d = p.AsDictionary;
                tbLoginName.Text     = d.GetOrDefault <string>("loginName");
                tbRealName.Text      = d.GetOrDefault <string>("realName");
                tbQQ.Text            = d.GetOrDefault <string>("qqNumber");
                tbMobile.Text        = d.GetOrDefault <string>("mobile");
                tbEmail.Text         = d.GetOrDefault <string>("email");
                tbCompany.Text       = d.GetOrDefault <string>("company");
                tbCompanyType.Text   = d.GetOrDefault <string>("companyType");
                tbPostalCode.Text    = d.GetOrDefault <string>("postalCode");
                tbCreateTime.Text    = Commons.TimestampToDateString(d.GetOrDefault <long>("createTime"));
                tbUpdateTime.Text    = Commons.TimestampToDateString(d.GetOrDefault <long>("updateTime"));
                tbIdCard.Text        = d.GetOrDefault <string>("idCard");
                tbOrgName.Text       = d.GetOrDefault <string>("orgName");
                tbPosition.Text      = d.GetOrDefault <string>("position");
                tbAddress.Text       = d.GetOrDefault <string>("address");
                tbBussLic.Text       = d.GetOrDefault <string>("bussLic");
                tbOrgCodeNo.Text     = d.GetOrDefault <string>("orgCodeNo");
                tbLawName.Text       = d.GetOrDefault <string>("lawName");
                tbLawIdCard.Text     = d.GetOrDefault <string>("lawIdCard");
                tbAccUserName.Text   = d.GetOrDefault <string>("accUserName");
                tbAccount.Text       = d.GetOrDefault <string>("account");
                tbAccBank.Text       = d.GetOrDefault <string>("accBank");
                tbHomeNo.Text        = d.GetOrDefault <string>("homePhone");
                tbInvestorLevel.Text = INVESTOR_LEVEL.FindByValue(d.GetOrDefault <int>("lvl"));

                m_status = d.GetOrDefault <int>("status");
                UpdateAllowInvest(d.GetOrDefault <bool>("allowInvest"));
                UpdateAllowBorrow(d.GetOrDefault <bool>("allowBorrow"));
                var locked = d.GetOrDefault <int>("locked");
                UpdateBtnLock(locked == 98 || locked == 99);
            }
            else
            {
                Commons.ShowResultErrorBox(this, p);
            }
            SetReadOnly(m_status == 2 && !MainFrm.IsAdmin);
        }