public static WSVendorNAV.WSVendor MapVendorModelToVendorNAV(FornecedorDetailsViewModel VendorModel)
        {
            WSVendorNAV.WSVendor VendorNAV = new WSVendorNAV.WSVendor();
            if (VendorModel != null)
            {
                VendorNAV.No                  = VendorModel.No;
                VendorNAV.Name                = VendorModel.Name;
                VendorNAV.Post_Code           = VendorModel.PostCode;
                VendorNAV.City                = VendorModel.City;
                VendorNAV.Country_Region_Code = VendorModel.Country;
                VendorNAV.Phone_No            = VendorModel.Phone;
                VendorNAV.E_Mail              = VendorModel.Email;
                VendorNAV.Fax_No              = VendorModel.Fax;
                VendorNAV.Home_Page           = VendorModel.HomePage;
                VendorNAV.VAT_Registration_No = VendorModel.VATRegistrationNo;
                VendorNAV.Payment_Terms_Code  = VendorModel.PaymentTermsCode;
                VendorNAV.Payment_Method_Code = VendorModel.PaymentMethodCode;
                VendorNAV.No_Cliente_Assoc    = VendorModel.NoClienteAssociado;
                VendorNAV.Blocked             = (Blocked)VendorModel.Blocked;
                VendorNAV.Address             = VendorModel.Address;
                VendorNAV.Address_2           = VendorModel.Address_2;
                VendorNAV.County              = VendorModel.Distrito;
                VendorNAV.Criticidade         = (Criticidade)VendorModel.Criticidade;
                VendorNAV.Observacoes         = VendorModel.Observacoes;
            }

            return(VendorNAV);
        }
        public static FornecedorDetailsViewModel MapVendorNAVToVendorModel(WSVendorNAV.WSVendor VendorNAV)
        {
            FornecedorDetailsViewModel VendorVM = new FornecedorDetailsViewModel();

            if (VendorNAV != null)
            {
                VendorVM.No                 = VendorNAV.No;
                VendorVM.Name               = VendorNAV.Name;
                VendorVM.FullAddress        = VendorNAV.Address + " " + VendorNAV.Address_2;
                VendorVM.PostCode           = VendorNAV.Post_Code;
                VendorVM.City               = VendorNAV.City;
                VendorVM.Country            = VendorNAV.Country_Region_Code;
                VendorVM.Phone              = VendorNAV.Phone_No;
                VendorVM.Email              = VendorNAV.E_Mail;
                VendorVM.Fax                = VendorNAV.Fax_No;
                VendorVM.HomePage           = VendorNAV.Home_Page;
                VendorVM.VATRegistrationNo  = VendorNAV.VAT_Registration_No;
                VendorVM.PaymentTermsCode   = VendorNAV.Payment_Terms_Code;
                VendorVM.PaymentMethodCode  = VendorNAV.Payment_Method_Code;
                VendorVM.NoClienteAssociado = VendorNAV.No_Cliente_Assoc;
                VendorVM.Blocked            = (int)VendorNAV.Blocked;
                VendorVM.Address            = VendorNAV.Address;
                VendorVM.Address_2          = VendorNAV.Address_2;
                VendorVM.Distrito           = VendorNAV.County;
                VendorVM.Criticidade        = (int)VendorNAV.Criticidade;
                VendorVM.Observacoes        = VendorNAV.Observacoes;
            }

            return(VendorVM);
        }