public string GetData(object UserId,string LinkedinId) { string ret = string.Empty; try { Guid userId = (Guid)UserId; Api.LinkedinAccount.LinkedinAccount ApiObjLinkedinAccount = new Api.LinkedinAccount.LinkedinAccount(); List<Domain.Myfashion.Domain.LinkedInAccount> lstLinkedInAccount = (List<Domain.Myfashion.Domain.LinkedInAccount>)(new JavaScriptSerializer().Deserialize(ApiObjLinkedinAccount.GetAllLinkedinAccountsOfUser(userId.ToString()), typeof(List<Domain.Myfashion.Domain.LinkedInAccount>))); //List<LinkedInAccount> lstLinkedinAccount = new List<LinkedInAccount>(); foreach (LinkedInAccount item in lstLinkedInAccount) { try { Api.Linkedin.Linkedin ApiObjLinkedin = new Api.Linkedin.Linkedin(); ret = ApiObjLinkedin.getLinkedInData(item.UserId.ToString(), item.LinkedinUserId); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } catch (Exception ex) { Console.WriteLine(ex.Message); } return ret; }
public string GetData(object UserId,string LinkedinId) { string ret = string.Empty; Guid userId = (Guid)UserId; Api.LinkedinAccount.LinkedinAccount ApiObjLinkedinAccount = new Api.LinkedinAccount.LinkedinAccount(); List<Domain.Socioboard.Domain.LinkedInAccount> lstLinkedInAccount = (List<Domain.Socioboard.Domain.LinkedInAccount>)(new JavaScriptSerializer().Deserialize(ApiObjLinkedinAccount.GetAllLinkedinAccountsOfUser(userId.ToString()), typeof(List<Domain.Socioboard.Domain.LinkedInAccount>))); //List<LinkedInAccount> lstLinkedinAccount = new List<LinkedInAccount>(); foreach (LinkedInAccount item in lstLinkedInAccount) { Api.Linkedin.Linkedin ApiObjLinkedin = new Api.Linkedin.Linkedin(); ret=ApiObjLinkedin.getLinkedInData(item.UserId.ToString(), item.LinkedinUserId); } return ret; }