static void SMain(string[] args)
        {
            InsuranceWebService insuranceWebService = new InsuranceWebService();
            var getDetProdList = new GetDetailedProduct();


            var Username          = "";
            var Password          = "";
            var SearchDate        = new DateTime(); // Set as required
            var AuthenticationKey = "";

            var response = insuranceWebService.GetDetailedProductListRequest(Username, Password, AuthenticationKey, SearchDate);

            for (int i = 0; i < response.Description.Length; i++)
            {
                Console.WriteLine("Description: " + response.Description[i]);
                Console.WriteLine("Product: " + response.Product[i]);
                Console.WriteLine("Plan: " + response.Plan[i]);
                Console.WriteLine("NonMonthly: " + response.NonMonthly[i]);
                Console.WriteLine("MinTerm: " + response.MinTerm[i]);
                Console.WriteLine("MaxTerm: " + response.MaxTerm[i]);
                Console.WriteLine("Period: " + response.Period[i]);
                Console.WriteLine("MinPremium: " + response.MinPremium[i]);
                Console.WriteLine("MaxPremium: " + response.MaxPremium[i]);
                Console.WriteLine("MinPrice: " + response.MinPrice[i]);
                Console.WriteLine("MaxPrice: " + response.MaxPrice[i]);
                Console.WriteLine("MaxAge: " + response.MaxAge[i]);
                Console.WriteLine("MaxMiles: " + response.MaxMiles[i]);
                Console.WriteLine("MinCC: " + response.MinCC[i]);
            }
            Console.ReadKey();
        }
예제 #2
0
 public Response GetDetailProductListRequest(Dictionary <string, object> parameters)
 {
     try
     {
         var insReq = new InsuranceRequest();
         var sess   = new SessionRequest
         {
             Username          = (String)parameters["Username"],
             Password          = "",
             AuthenticationKey = (String)parameters["AuthenticationKey"],
             SearchDate        = (DateTime)parameters["SearchDate"]
         };
         insReq.Session = sess;
         var response = insuranceWebService.GetDetailedProductListRequest(sess.Username, sess.AuthenticationKey, sess.Password, sess.SearchDate);
         return(MethodRespToObject(response));
     }
     catch (Exception e)
     {
         Console.WriteLine(e.InnerException.Message);
         return(null);
     }
 }