public ActionResult Index() { var model = new AccountOverviewViewModel(); var customer = Exigo.GetCustomerRealTime(Identity.Current.CustomerID); var website = Exigo.GetCustomerSiteRealTime(Identity.Current.CustomerID); var socialNetworksResponse = Exigo.WebService().GetCustomerSocialNetworks(new GetCustomerSocialNetworksRequest() { CustomerID = Identity.Current.CustomerID }); foreach (var network in socialNetworksResponse.CustomerSocialNetwork) { switch (network.SocialNetworkID) { case (int)SocialNetworks.Facebook: model.Facebook = network.Url; break; case (int)SocialNetworks.Twitter: model.Twitter = network.Url; break; case (int)SocialNetworks.YouTube: model.YouTube = network.Url; break; case (int)SocialNetworks.Blog: model.Blog = network.Url; break; case (int)SocialNetworks.GooglePlus: model.GooglePlus = network.Url; break; case (int)SocialNetworks.LinkedIn: model.LinkedIn = network.Url; break; case (int)SocialNetworks.MySpace: model.MySpace = network.Url; break; case (int)SocialNetworks.Pinterest: model.Pinterest = network.Url; break; case (int)SocialNetworks.Instagram: model.Instagram = network.Url; break; } } model.Customer = customer; model.WebAlias = website.WebAlias; model.CustomerSite.FirstName = website.FirstName; model.CustomerSite.LastName = website.LastName; model.CustomerSite.Email = website.Email; model.CustomerSite.PrimaryPhone = website.PrimaryPhone; model.CustomerSite.SecondaryPhone = website.SecondaryPhone; model.CustomerSite.Fax = website.Fax; model.CustomerSite.Notes1 = website.Notes1; model.CustomerSite.Notes2 = website.Notes2; model.CustomerSite.Notes3 = website.Notes3; model.CustomerSite.Notes4 = website.Notes4; model.CustomerSite.Address.Address1 = website.Address.Address1; model.CustomerSite.Address.Address2 = website.Address.Address2; model.CustomerSite.Address.Country = website.Address.Country; model.CustomerSite.Address.City = website.Address.City; model.CustomerSite.Address.State = website.Address.State; model.CustomerSite.Address.Zip = website.Address.Zip; return(View(model)); }