Ejemplo n.º 1
0
    public static BillingJSON1 Deserialize(string json, out BillingJSON1 details)
    {
        // string JsonData = "http://192.168.1.35:4782/BillingSystem/rest/selfservice";

        //  var webClient = new WebClient();
        //    string data = webClient.DownloadString(JsonData);
        //Console.WriteLine(data);

        //try
        //{
        JavaScriptSerializer ser = new JavaScriptSerializer();

        details = ser.Deserialize <BillingJSON1>(json);
        return(details);

        //    }
        //    catch (WebException ex)
        //    {
        //        if (ex.Status == WebExceptionStatus.ProtocolError)
        //        {
        //            var response = ex.Response as HttpWebResponse;
        //            if (response != null)
        //            {
        //                Console.WriteLine("HTTP Status Code: " + (int)response.StatusCode);
        //            }
        //        }


        //}
        //    return name;
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // BillingJSON1 details = new BillingJSON1();
        string       json = System.IO.File.ReadAllText(@"D:\bill.json");
        BillingJSON1 details;

        BillingJSON1.Deserialize(json, out details);

        lblPhone.Text   = details.PrimaryPhone.value.ToString();
        lblAccount.Text = details.AccountNumber.value.ToString();
        lblDate.Text    = details.BillDate.value.ToString();

        lblBundlePrice.Text = details.Details_of_Current_Charges.Fios_TV_Internet_and_Phone_Bundle.Bundle_Price.Price.value.ToString();
        string service_from = details.Details_of_Current_Charges.Fios_TV_Internet_and_Phone_Bundle.Bundle_Price.Service_from.value.ToString();
        string service_to   = details.Details_of_Current_Charges.Fios_TV_Internet_and_Phone_Bundle.Bundle_Price.Service_to.value.ToString();

        lblBundleDate.Text = service_from + "-" + service_to;

        lblOnlineBackup.Text     = details.Details_of_Current_Charges.Additional_Services_and_Equipment.Services.Online_Backup_and_Sharing.Price.value.ToString();
        lblOnlineBackupDate.Text = details.Details_of_Current_Charges.Additional_Services_and_Equipment.Services.Online_Backup_and_Sharing.Service_from.value.ToString() + "-" + details.Details_of_Current_Charges.Additional_Services_and_Equipment.Services.Online_Backup_and_Sharing.Service_to.value.ToString();

        lblSetTop.Text     = details.Details_of_Current_Charges.Additional_Services_and_Equipment.Equipment.Set_Top_Box.Price.value.ToString();
        lblSetTopDate.Text = details.Details_of_Current_Charges.Additional_Services_and_Equipment.Equipment.Set_Top_Box.Service_from.value.ToString() + "-" + details.Details_of_Current_Charges.Additional_Services_and_Equipment.Equipment.Set_Top_Box.Service_to.value.ToString();


        lblHD.Text     = details.Details_of_Current_Charges.Additional_Services_and_Equipment.Equipment.HD_MultiRoom_DVR.Price.value.ToString();
        lblHDDate.Text = details.Details_of_Current_Charges.Additional_Services_and_Equipment.Equipment.HD_MultiRoom_DVR.Service_from.value.ToString() + "-" + details.Details_of_Current_Charges.Additional_Services_and_Equipment.Equipment.HD_MultiRoom_DVR.Service_to.value.ToString();

        lblSubTotal.Text = details.Details_of_Current_Charges.Additional_Services_and_Equipment.Subtotal.value.ToString();


        lblFederalTax.Text = details.Details_of_Current_Charges.Fees_and_other_charges.Taxes_and_Governmental_fees_and_Surcharges.Federal_exciseTax.value.ToString();
        lblStateSales.Text = details.Details_of_Current_Charges.Fees_and_other_charges.Taxes_and_Governmental_fees_and_Surcharges.State_sales_tax.value.ToString();
        lblEmergFee.Text   = details.Details_of_Current_Charges.Fees_and_other_charges.Taxes_and_Governmental_fees_and_Surcharges._911_system_emerg_resp_fee.value.ToString();

        lblUniversalFee.Text = details.Details_of_Current_Charges.Fees_and_other_charges.Verizon_surcharges_and_fees.Federal_Universal_Service.value.ToString();
        lblRegulatory.Text   = details.Details_of_Current_Charges.Fees_and_other_charges.Verizon_surcharges_and_fees.Regularity_recovery_fee.value.ToString();
        lblVLDCarrier.Text   = details.Details_of_Current_Charges.Fees_and_other_charges.Verizon_surcharges_and_fees.VLD_CCRC.value.ToString();

        lblFederalSubscriber.Text = details.Details_of_Current_Charges.Fees_and_other_charges.Verizon_surcharges_and_fees.Federal_Subscriber_line_and_access.value.ToString();

        lblVideo.Text = details.Details_of_Current_Charges.Fees_and_other_charges.Verizon_surcharges_and_fees.Video_Franchise_fee.value.ToString();

        lblVLDLong.Text = details.Details_of_Current_Charges.Fees_and_other_charges.Verizon_surcharges_and_fees.VLD_long_distance_Administrative_charge.value.ToString();

        lblCATVAccess.Text     = details.Details_of_Current_Charges.Fees_and_other_charges.Verizon_surcharges_and_fees.CATV_Universal_access_fund.value.ToString();
        lblRegionalSports.Text = details.Details_of_Current_Charges.Fees_and_other_charges.Verizon_surcharges_and_fees.Regional_Sports_Network_fee.value.ToString();
        lblFIOSBroardcast.Text = details.Details_of_Current_Charges.Fees_and_other_charges.Verizon_surcharges_and_fees.FIOS_TV_Broadcast_fee.value.ToString();


        lblSubTotalFees.Text = details.Details_of_Current_Charges.Fees_and_other_charges.Subtotal.value.ToString();

        lblTotalDue.Text = details.Total_Due.value.ToString();
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string json = System.IO.File.ReadAllText(@"D:\bill.json");

        //using (WebClient webClient = new System.Net.WebClient())
        //{
        //    WebClient n = new WebClient();
        //    var json = n.DownloadString("http://192.168.1.35:4782/BillingSystem/rest/selfservice");
        //    string valueOriginal = Convert.ToString(json);

        BillingJSON1.Deserialize(json, out details);


        lblPhone.Text   = details.PrimaryPhone.value.ToString();
        lblAccount.Text = details.AccountNumber.value.ToString();
        lblDate.Text    = details.BillDate.value.ToString();


        lblPreviousBalance.Text = details.Account_Summary.Previous_Period.PreviousBalance.value.ToString();
        lblPaymentReceived.Text = details.Account_Summary.Previous_Period.PaymentReceived.value.ToString();
        lblPaymentDate.Text     = details.Account_Summary.Previous_Period.PaymentDate.value.ToString();
        lblBalanceForward.Text  = details.Account_Summary.Previous_Period.BalanceForward.value.ToString();

        lblFIOS.Text = details.Account_Summary.Current_Charges.FIOSTV_Internet_and_Phone_Bundle.Price.value.ToString();
        string servicefrom = details.Account_Summary.Current_Charges.FIOSTV_Internet_and_Phone_Bundle.Servicefrom.value.ToString();
        string serviceto   = details.Account_Summary.Current_Charges.FIOSTV_Internet_and_Phone_Bundle.Serviceto.value.ToString();

        lblCCFIOSDate.Text = servicefrom + "-" + serviceto;


        lblAddService.Text = details.Account_Summary.Current_Charges.Additional_Services_and_Equipment.value.ToString();
        lblFees.Text       = details.Account_Summary.Current_Charges.Fees_and_Other_Charges.value.ToString();

        lblDueDate1.Text = details.Total_Due_by_Date.value.ToString();
        lblDueDate2.Text = details.Total_Due_by_Date.value.ToString();

        lblTotalDue1.Text = details.Total_Due.value.ToString();

        //}
    }
Ejemplo n.º 4
0
    public static BillingJSON1 Deserialize(string json, out BillingJSON1 details)
    {
        // string JsonData = "http://192.168.1.35:4782/BillingSystem/rest/selfservice";

            //  var webClient = new WebClient();
            //    string data = webClient.DownloadString(JsonData);
            //Console.WriteLine(data);

            //try
            //{
            JavaScriptSerializer ser = new JavaScriptSerializer();

            details = ser.Deserialize<BillingJSON1>(json);
            return details;

            //    }
            //    catch (WebException ex)
            //    {
            //        if (ex.Status == WebExceptionStatus.ProtocolError)
            //        {
            //            var response = ex.Response as HttpWebResponse;
            //            if (response != null)
            //            {
            //                Console.WriteLine("HTTP Status Code: " + (int)response.StatusCode);
            //            }
            //        }

            //}
            //    return name;
    }