public string GetAllFacebookAccountsByUserIdAndGroupId(string userid, string groupid)
 {
     try
     {
         List <Domain.Myfashion.Domain.FacebookAccount> lstFacebookAccount = new List <Domain.Myfashion.Domain.FacebookAccount>();
         Domain.Myfashion.Domain.Team objTeam = objTeamRepository.GetTeamByGroupId(Guid.Parse(groupid));
         List <Domain.Myfashion.Domain.TeamMemberProfile> lstTeamMemberProfile = objTeamMemberProfileRepository.GetTeamMemberProfileByTeamIdAndProfileType(objTeam.Id, "facebook");
         foreach (var item in lstTeamMemberProfile)
         {
             try
             {
                 if (objFacebookAccountRepository.checkFacebookUserExists(item.ProfileId, Guid.Parse(userid)))
                 {
                     lstFacebookAccount.Add(objFacebookAccountRepository.getFacebookAccountDetailsById(item.ProfileId, Guid.Parse(userid)));
                 }
                 else
                 {
                     lstFacebookAccount.Add(objFacebookAccountRepository.getFacebookAccountDetailsById(item.ProfileId));
                 }
             }
             catch (Exception)
             {
             }
         }
         return(new JavaScriptSerializer().Serialize(lstFacebookAccount));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
         return("Something Went Wrong");
     }
 }
 public string GetAllLinkedinCompanyPageByUserIdAndGroupId(string userid, string groupid)
 {
     try
     {
         List <Domain.Myfashion.Domain.LinkedinCompanyPage> lstLinkedInCompanyPage = new List <Domain.Myfashion.Domain.LinkedinCompanyPage>();
         Domain.Myfashion.Domain.Team objTeam = objTeamRepository.GetTeamByGroupId(Guid.Parse(groupid));
         List <Domain.Myfashion.Domain.TeamMemberProfile> lstTeamMemberProfile = objTeamMemberProfileRepository.GetTeamMemberProfileByTeamIdAndProfileType(objTeam.Id, "linkedincompanypage");
         foreach (var item in lstTeamMemberProfile)
         {
             try
             {
                 lstLinkedInCompanyPage.Add(objLinkedCmpnyPgeRepo.getCompanyPageInformation(Guid.Parse(userid), item.ProfileId));
             }
             catch (Exception)
             {
             }
         }
         return(new JavaScriptSerializer().Serialize(lstLinkedInCompanyPage));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
         return("Something Went Wrong");
     }
 }
 public string GetAllBloggerAccountByUserIdAndGroupId(string userid, string groupid)
 {
     try
     {
         List <Domain.Myfashion.Domain.GooglePlusAccount> lstGooglePlusAccount = new List <Domain.Myfashion.Domain.GooglePlusAccount>();
         Domain.Myfashion.Domain.Team objTeam = objTeamRepository.GetTeamByGroupId(Guid.Parse(groupid));
         List <Domain.Myfashion.Domain.TeamMemberProfile> lstTeamMemberProfile = objTeamMemberProfileRepository.GetTeamMemberProfileByTeamIdAndProfileType(objTeam.Id, "gplus");
         foreach (var item in lstTeamMemberProfile)
         {
             try
             {
                 lstGooglePlusAccount.Add(ObjGooglePlusAccountsRepo.getGooglePlusAccountDetailsById(item.ProfileId, Guid.Parse(userid)));
             }
             catch (Exception)
             {
             }
         }
         return(new JavaScriptSerializer().Serialize(lstGooglePlusAccount));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
         return("Something Went Wrong");
     }
 }
Exemple #4
0
 public string GetAllTwitterAccountsByUserIdAndGroupId(string userid, string groupid)
 {
     try
     {
         List <Domain.Myfashion.Domain.TwitterAccount> lstTwitterAccount = new List <Domain.Myfashion.Domain.TwitterAccount>();
         Domain.Myfashion.Domain.Team objTeam = objTeamRepository.GetTeamByGroupId(Guid.Parse(groupid));
         List <Domain.Myfashion.Domain.TeamMemberProfile> lstTeamMemberProfile = objTeamMemberProfileRepository.GetTeamMemberProfileByTeamIdAndProfileType(objTeam.Id, "twitter");
         foreach (var item in lstTeamMemberProfile)
         {
             try
             {
                 lstTwitterAccount.Add(objTwitterAccountRepository.GetUserInformation(Guid.Parse(userid), item.ProfileId));
             }
             catch (Exception)
             {
             }
         }
         return(new JavaScriptSerializer().Serialize(lstTwitterAccount));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
         return("Something Went Wrong");
     }
 }
Exemple #5
0
 public string GetAllLinkedinAccountsByUserIdAndGroupId(string userid, string groupid)
 {
     try
     {
         LinkedInAccountRepository _objLinkedInAccountRepository           = new LinkedInAccountRepository();
         List <Domain.Myfashion.Domain.LinkedInAccount> lstLinkedInAccount = new List <Domain.Myfashion.Domain.LinkedInAccount>();
         Domain.Myfashion.Domain.Team objTeam = objTeamRepository.GetTeamByGroupId(Guid.Parse(groupid));
         List <Domain.Myfashion.Domain.TeamMemberProfile> lstTeamMemberProfile = objTeamMemberProfileRepository.GetTeamMemberProfileByTeamIdAndProfileType(objTeam.Id, "linkedin");
         foreach (var item in lstTeamMemberProfile)
         {
             try
             {
                 if (_objLinkedInAccountRepository.checkLinkedinUserExists(item.ProfileId, Guid.Parse(userid)))
                 {
                     lstLinkedInAccount.Add(objlinkedinaccrepo.getUserInformation(Guid.Parse(userid), item.ProfileId));
                 }
                 else
                 {
                     lstLinkedInAccount.Add(objlinkedinaccrepo.getUserInformation(item.ProfileId));
                 }
             }
             catch (Exception)
             {
             }
         }
         return(new JavaScriptSerializer().Serialize(lstLinkedInAccount));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
         return("Something Went Wrong");
     }
 }