コード例 #1
0
        public GetAgencyBalanceReponse GetAgencyBalance()
        {
            GetAgencyBalanceReponse agencyBal = new GetAgencyBalanceReponse();

            try
            {
                GetAgencyBalanceRequest agency = new GetAgencyBalanceRequest();
                agency.ClientId      = apiClientId;
                agency.EndUserIp     = IPAddress;
                agency.TokenId       = BLFunction.GetTokenID();
                agency.TokenAgencyId = BLFunction.GetAgencyID();
                agency.TokenMemberId = BLFunction.GetMemberID();
                var    jsonStringObject = JsonConvert.SerializeObject(agency);
                String Qualifiedurl     = Baseurl + "SharedServices/SharedData.svc/rest/GetAgencyBalance";
                var    result           = APIHotel.Instance().GetResponse(Qualifiedurl, Verbs.POST, jsonStringObject);
                if (result != null)
                {
                    agencyBal = JsonConvert.DeserializeObject <GetAgencyBalanceReponse>(result);
                }
                return(agencyBal);
            }
            catch (Exception ex)
            {
                agencyBal.Error.ErrorMessage = ex.Message;
                return(agencyBal);
            }
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         GetAgencyBalanceReponse agency = DataProviderWrapper.Instance.GetAgencyBalance();
         if (agency != null)
         {
             ltrAmount.Text = String.Format("{0:0,0.00}", agency.CashBalance);
         }
     }
 }