public string DeleteFacebookAccount(string UserId, string ProfileId, string GroupId, string Profiletype) { try { Domain.Socioboard.Domain.FacebookAccount facebook = objFacebookAccountRepository.getFacebookAccountDetailsByUserProfileId(ProfileId, Guid.Parse(UserId)); if (facebook.Type != "Page") { shreathonpage.DeleteShareathonByFacebookId(facebook.FbUserId, Guid.Parse(UserId)); Profiletype = "facebook"; } else { shreathonpage.DeleteShareathonByFacebookPageId(facebook.FbUserId, Guid.Parse(UserId)); Profiletype = "facebook_page"; } shareathongrp.DeleteGroupShareathonByFacebookId(facebook.FbUserId, facebook.UserId); objFacebookAccountRepository.deleteFacebookUser(ProfileId, Guid.Parse(UserId)); //objFacebookFeedRepository.deleteAllFeedsOfUser(ProfileId, Guid.Parse(UserId)); //objFacebookMessageRepository.deleteAllMessagesOfUser(ProfileId, Guid.Parse(UserId)); //Domain.Socioboard.Domain.Team objTeam=objTeamRepository.GetTeamByGroupId(Guid.Parse(GroupId)); //objTeamMemberProfileRepository.DeleteTeamMemberProfileByTeamIdProfileId(ProfileId, objTeam.Id); objGroupProfileRepository.DeleteGroupProfile(Guid.Parse(UserId), ProfileId, Guid.Parse(GroupId), Profiletype); objSocialProfilesRepository.deleteProfile(Guid.Parse(UserId), ProfileId, Profiletype); return(new JavaScriptSerializer().Serialize("")); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); return("Something Went Wrong"); } }
public string DeleteFacebookAccount(string UserId, string ProfileId, string GroupId) { try { objFacebookAccountRepository.deleteFacebookUser(ProfileId, Guid.Parse(UserId)); //objFacebookFeedRepository.deleteAllFeedsOfUser(ProfileId, Guid.Parse(UserId)); //objFacebookMessageRepository.deleteAllMessagesOfUser(ProfileId, Guid.Parse(UserId)); Domain.Socioboard.Domain.Team objTeam = objTeamRepository.GetTeamByGroupId(Guid.Parse(GroupId)); objTeamMemberProfileRepository.DeleteTeamMemberProfileByTeamIdProfileId(ProfileId, objTeam.Id); objGroupProfileRepository.DeleteGroupProfile(Guid.Parse(UserId), ProfileId, Guid.Parse(GroupId)); objSocialProfilesRepository.deleteProfile(Guid.Parse(UserId), ProfileId); return(new JavaScriptSerializer().Serialize("")); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); return("Something Went Wrong"); } }