コード例 #1
0
        public NavCustomer getNavCustomer(string CustomerCode)
        {
            NavCustomers_Service NAVCustomerSVC = new NavCustomers_Service();

            NAVCustomerSVC.UseDefaultCredentials = true;
            NAVCustomerSVC.PreAuthenticate       = true;

            NavCustomer customerRec = new NavCustomer();

            NavCustomers.NavCustomers NavCust = NAVCustomerSVC.Read(CustomerCode);

            NavCustomer currCust = ConvertNavCustomerToCustomer(NavCust);

            return(currCust);
        }
コード例 #2
0
        public NavCustomer ConvertNavCustomerToCustomer(NavCustomers.NavCustomers NavCustomerRec)
        {
            //transpose Nav Product to Router Product Rec
            NavCustomer newCustomerRec = new NavCustomer();

            newCustomerRec.CustomerID       = NavCustomerRec.No; //create the lookups for this
            newCustomerRec.CustomerNames    = NavCustomerRec.Name;
            newCustomerRec.CustomerBusGroup = NavCustomerRec.Gen_Bus_Posting_Group;
            newCustomerRec.RouteSalesArea   = NavCustomerRec.Sales_Area; //create the lookups for this
            newCustomerRec.PINNo            = NavCustomerRec.PIN_No;
            newCustomerRec.CustomerPhoneNo  = NavCustomerRec.Phone_No;
            newCustomerRec.PostingGroup     = NavCustomerRec.Customer_Posting_Group; //change this to look at an actual price ist
            newCustomerRec.VATGroup         = NavCustomerRec.VAT_Bus_Posting_Group;  //create the lookups for this
            newCustomerRec.CreditLimit      = NavCustomerRec.Credit_Limit_LCY;
            newCustomerRec.Address          = NavCustomerRec.Address;
            return(newCustomerRec);
        }