private async void UpdateTable() { var p = await InvestPersons.Account(m_auId); if (p.IsOk) { var r = p.AsDictionary; tbLoginName.Text = r.GetOrDefault <string>("loginName"); tbRealName.Text = r.GetOrDefault <string>("realName"); tbMobile.Text = r.GetOrDefault <string>("mobile"); tbEmail.Text = r.GetOrDefault <string>("email"); tbRegTime.Text = Commons.TimestampToDateTimeString(r.GetOrDefault <long>("regTime")); tbRMobile.Text = r.GetOrDefault <string>("recommendMobile"); tbCompany.Text = r.GetOrDefault <string>("company"); tbCompanyType.Text = r.GetOrDefault <string>("companyType"); tbPosition.Text = r.GetOrDefault <string>("position"); tbAddress.Text = r.GetOrDefault <string>("address"); tbPostalCode.Text = r.GetOrDefault <string>("postalCode"); tbIdCard.Text = r.GetOrDefault <string>("idCard"); tbHomePhone.Text = r.GetOrDefault <string>("homePhone"); tbQQ.Text = r.GetOrDefault <string>("qqNumber"); tbOrgCode.Text = r.GetOrDefault <string>("orgCode"); tbInvestorLevel.Text = INVESTOR_LEVEL.FindByValue(r.GetOrDefault <int>("lvl")); var m_jxStatus = r.GetOrDefault <bool>("jxStatus"); if (m_jxStatus) { UpdateAllowInvest(r.GetOrDefault <bool>("allowInvest")); UpdateAllowBorrow(r.GetOrDefault <bool>("allowBorrow")); btnBankInfo.Enabled = true; btnFreezeMoney.Enabled = true; btnInvestDetailsDepository.Enabled = true; btnInvestDetailsPlatform.Enabled = true; btnBorrowDetails.Enabled = true; btnAllowInvest.Enabled = true; btnAllowBorrow.Enabled = true; } else { btnFreezeMoney.Enabled = false; btnInvestDetailsDepository.Enabled = false; btnInvestDetailsPlatform.Enabled = false; btnBorrowDetails.Enabled = false; btnAllowInvest.Enabled = false; btnAllowBorrow.Enabled = false; } m_status = r.GetOrDefault <int>("status"); var locked = r.GetOrDefault <int>("locked"); UpdateBtnLock(locked == 98 || locked == 99); } else { Commons.ShowResultErrorBox(this, p); } }
public static string ToDateTime(this JToken j) { string s = j.ToStdString(); if (!string.IsNullOrEmpty(s)) { long d; if (long.TryParse(s, out d)) { return(Commons.TimestampToDateTimeString(d)); } } return(""); }