private static void TestDynamicsNavSoapWebService()
        {
            // Creates instance of service and sets credentials.
            soap.Customer_Service service = new soap.Customer_Service();
            service.UseDefaultCredentials = true;
            // Creates instance of customer.
            soap.Customer cust = new soap.Customer();
            cust.Name = "Customer Name";
            Msg("Pre Create");
            PrintCustomer(cust);

            // Inserts customer.
            service.Create(ref cust);
            Msg("Post Create");
            PrintCustomer(cust);

            // Creates filter for searching for customers.
            List <soap.Customer_Filter> filterArray = new List <soap.Customer_Filter>();

            soap.Customer_Filter nameFilter = new soap.Customer_Filter();
            nameFilter.Field    = soap.Customer_Fields.Name;
            nameFilter.Criteria = "C*";
            filterArray.Add(nameFilter);

            Msg("List before modification");
            PrintCustomerList(service, filterArray);

            // Creates filter for searching for customers.
            List <soap.Customer_Filter> filterArray1 = new List <soap.Customer_Filter>();

            soap.Customer_Filter noFilter = new soap.Customer_Filter();
            noFilter.Field    = soap.Customer_Fields.No;
            noFilter.Criteria = "01*";
            filterArray1.Add(noFilter);
            PrintCustomerList(service, filterArray1);

            cust.Name = cust.Name + "Updated";
            service.Update(ref cust);

            Msg("Post Update");
            PrintCustomer(cust);

            Msg("List after modification");
            PrintCustomerList(service, filterArray);
            //service.Delete(cust.Key);

            Msg("List after deletion");
            PrintCustomerList(service, filterArray);
        }
 static void PrintCustomer(soap.Customer c)
 {
     Console.WriteLine("No: {0} Name: {1} Location_code: {2}", c.No, c.Name, c.Location_Code);
 }