Esempio n. 1
0
        /// <getGroupDetailsbyId>
        /// Get the details of Group by user id and group id.
        /// </summary>
        /// <param name="userid">User id (Guid)</param>
        /// <param name="groupname">Id of Group(Guid)</param>
        /// <returns>Return the object of group.(Domein.Group)</returns>
        public Domain.Socioboard.Domain.Groups getGroupDetailsbyId(Guid userid, Guid groupid)
        {
            //Creates a database connection and opens up a session
            using (NHibernate.ISession session = SessionFactory.GetNewSession())
            {
                //After Session creation, start Transaction.
                using (NHibernate.ITransaction transaction = session.BeginTransaction())
                {
                    try
                    {
                        NHibernate.IQuery query = session.CreateQuery("from Groups where UserId = :userid and Id=:groupname");

                        query.SetParameter("userid", userid);
                        query.SetParameter("groupname", groupid);
                        Domain.Socioboard.Domain.Groups grou = query.UniqueResult <Domain.Socioboard.Domain.Groups>();
                        return(grou);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                        return(null);
                    }
                } //End Transaction
            }     //End Session
        }
Esempio n. 2
0
        // Commented By Antima

        //public ActionResult linkedinwallposts(string profileid)
        //{
        //    Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
        //    Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
        //    Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
        //    Api.LinkedInFeed.LinkedInFeed ApiobjLinkedInFeed = new Api.LinkedInFeed.LinkedInFeed();
        //    List<Domain.Socioboard.Domain.LinkedInFeed> lstLinkedInFeed = (List<Domain.Socioboard.Domain.LinkedInFeed>)(new JavaScriptSerializer().Deserialize(ApiobjLinkedInFeed.GetLinkedInFeeds(objGroups.UserId.ToString(), profileid), typeof(List<Domain.Socioboard.Domain.LinkedInFeed>)));
        //    List<object> lstobject = new List<object>();
        //    foreach (var item in lstLinkedInFeed)
        //    {
        //        lstobject.Add(item);
        //    }
        //    dictwallposts.Add("linkedin", lstobject);
        //    return PartialView("_Panel1Partial", dictwallposts);
        //}

        public ActionResult linkedinwallposts(string profileid, string load)
        {
            Dictionary <string, List <object> > dictwallposts = new Dictionary <string, List <object> >();

            if (load == "first")
            {
                Session["LinkedInProfileIdForFeeds"] = profileid;
                linkedinwallcount = 0;
            }
            else
            {
                profileid         = (string)Session["LinkedInProfileIdForFeeds"];
                linkedinwallcount = linkedinwallcount + 10;
            }
            Api.Groups.Groups ApiobjGroups                               = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups                    = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.LinkedInFeed.LinkedInFeed   ApiobjLinkedInFeed           = new Api.LinkedInFeed.LinkedInFeed();
            List <Domain.Socioboard.Domain.LinkedInFeed> lstLinkedInFeed = (List <Domain.Socioboard.Domain.LinkedInFeed>)(new JavaScriptSerializer().Deserialize(ApiobjLinkedInFeed.GetLinkedInFeeds1(objGroups.UserId.ToString(), profileid, linkedinwallcount), typeof(List <Domain.Socioboard.Domain.LinkedInFeed>)));

            //List<Domain.Socioboard.Domain.LinkedInFeed> lstLinkedInFeed = (List<Domain.Socioboard.Domain.LinkedInFeed>)(new JavaScriptSerializer().Deserialize(ApiobjLinkedInFeed.GetLinkedInFeeds(objGroups.UserId.ToString(), profileid), typeof(List<Domain.Socioboard.Domain.LinkedInFeed>)));
            List <object> lstobject = new List <object>();

            foreach (var item in lstLinkedInFeed)
            {
                lstobject.Add(item);
            }
            dictwallposts.Add("linkedin", lstobject);
            return(PartialView("_Panel1Partial", dictwallposts));
        }
Esempio n. 3
0
        // Commented By Antima

        //public ActionResult TwitterNetworkDetails(string profileid)
        //{
        //    List<object> lstobject = new List<object>();
        //    Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
        //    Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
        //    Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
        //    Api.TwitterFeed.TwitterFeed ApiobjTwitterFeed = new Api.TwitterFeed.TwitterFeed();
        //    List<TwitterFeed> lstTwitterFeed = (List<TwitterFeed>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterFeed.GetAllTwitterFeedsByUserIdAndProfileId(objGroups.UserId.ToString(), profileid), typeof(List<TwitterFeed>)));
        //    foreach (var twitterfeed in lstTwitterFeed)
        //    {
        //        lstobject.Add(twitterfeed);
        //    }
        //    dictwallposts.Add("twitter", lstobject);
        //    return PartialView("_Panel1Partial", dictwallposts);
        //}

        public ActionResult TwitterNetworkDetails(string profileid, string load)
        {
            List <object> lstobject = new List <object>();
            Dictionary <string, List <object> > dictwallposts = new Dictionary <string, List <object> >();

            if (load == "first")
            {
                Session["TwitterProfileIdForFeeds"] = profileid;
                twtwallcount = 0;
            }
            else
            {
                profileid    = (string)Session["TwitterProfileIdForFeeds"];
                twtwallcount = twtwallcount + 10;
            }
            Api.Groups.Groups ApiobjGroups                    = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups         = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.TwitterFeed.TwitterFeed     ApiobjTwitterFeed = new Api.TwitterFeed.TwitterFeed();
            List <TwitterFeed> lstTwitterFeed                 = (List <TwitterFeed>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterFeed.GetAllTwitterFeedsByUserIdAndProfileId1((objGroups.UserId.ToString()), profileid, twtwallcount), typeof(List <TwitterFeed>)));

            //List<TwitterFeed> lstTwitterFeed = (List<TwitterFeed>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterFeed.GetAllTwitterFeedsByUserIdAndProfileId(objGroups.UserId.ToString(), profileid), typeof(List<TwitterFeed>)));
            foreach (var twitterfeed in lstTwitterFeed)
            {
                lstobject.Add(twitterfeed);
            }
            dictwallposts.Add("twitter", lstobject);
            return(PartialView("_Panel1Partial", dictwallposts));
        }
Esempio n. 4
0
        // Commented By Antima

        //public ActionResult TwitterFeeds(string profileid)
        //{
        //    List<object> lstobject = new List<object>();
        //    Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
        //    Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
        //    Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
        //    Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
        //    List<TwitterMessage> lstTwitterMessage = (List<TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessages(profileid, objGroups.UserId.ToString()), typeof(List<TwitterMessage>)));
        //    foreach (var twittermsg in lstTwitterMessage)
        //    {
        //        lstobject.Add(twittermsg);
        //    }
        //    dictwallposts.Add("twitter", lstobject);
        //    return PartialView("_Panel2Partial", dictwallposts);
        //}

        public ActionResult TwitterFeeds(string profileid, string load)
        {
            List <object> lstobject = new List <object>();

            if (load == "first")
            {
                Session["TwitterProfileIdForFeeds"] = profileid;
                twtfeedcount = 0;
            }
            else
            {
                profileid    = (string)Session["TwitterProfileIdForFeeds"];
                twtfeedcount = twtfeedcount + 10;
            }

            Dictionary <string, List <object> > dictwallposts = new Dictionary <string, List <object> >();

            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups   objGroups            = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List <TwitterMessage>             lstTwitterMessage    = (List <TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessages1(profileid, objGroups.UserId.ToString(), twtfeedcount), typeof(List <TwitterMessage>)));

            foreach (var twittermsg in lstTwitterMessage)
            {
                lstobject.Add(twittermsg);
            }
            dictwallposts.Add("twitter", lstobject);
            return(PartialView("_Panel2Partial", dictwallposts));
        }
Esempio n. 5
0
        // Commented By Antima

        //public ActionResult AjaxFeeds(string profileid)
        //{
        //    List<object> lstobject = new List<object>();
        //    Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
        //    Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
        //    Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
        //    Api.FacebookFeed.FacebookFeed ApiobjFacebookFeed = new Api.FacebookFeed.FacebookFeed();
        //    List<FacebookFeed> lstFacebookFeed = (List<FacebookFeed>)(new JavaScriptSerializer().Deserialize(ApiobjFacebookFeed.getAllFacebookFeedsByUserIdAndProfileId(objGroups.UserId.ToString(), profileid), typeof(List<FacebookFeed>)));
        //    foreach (var twittermsg in lstFacebookFeed)
        //    {
        //        lstobject.Add(twittermsg);
        //    }
        //    dictwallposts.Add("facebook", lstobject);
        //    return PartialView("_Panel2Partial", dictwallposts);
        //}

        public ActionResult AjaxFeeds(string profileid, string load)
        {
            List <object> lstobject = new List <object>();

            if (load == "first")
            {
                Session["FacebookProfileIdForFeeds"] = profileid;
                facebookfeedcount = 0;
            }
            else
            {
                profileid         = (string)Session["FacebookProfileIdForFeeds"];
                facebookfeedcount = facebookfeedcount + 10;
            }
            Dictionary <string, List <object> > dictwallposts = new Dictionary <string, List <object> >();

            Api.Groups.Groups ApiobjGroups                     = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups          = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.FacebookFeed.FacebookFeed   ApiobjFacebookFeed = new Api.FacebookFeed.FacebookFeed();
            List <FacebookFeed>             lstFacebookFeed    = (List <FacebookFeed>)(new JavaScriptSerializer().Deserialize(ApiobjFacebookFeed.getAllFacebookFeedsByUserIdAndProfileId1(objGroups.UserId.ToString(), profileid, facebookfeedcount), typeof(List <FacebookFeed>)));

            foreach (var twittermsg in lstFacebookFeed)
            {
                lstobject.Add(twittermsg);
            }
            dictwallposts.Add("facebook", lstobject);
            return(PartialView("_Panel2Partial", dictwallposts));
        }
Esempio n. 6
0
 /// <UpdateGroup>
 /// Update group name
 /// </summary>
 /// <param name="group">Set the group name in a Groups Class Property and Pass the same Object of Groups Class.(Domain.Groups)</param>
 public void UpdateGroup(Domain.Socioboard.Domain.Groups group)
 {
     //Creates a database connection and opens up a session
     using (NHibernate.ISession session = SessionFactory.GetNewSession())
     {
         //After Session creation, start Transaction.
         using (NHibernate.ITransaction transaction = session.BeginTransaction())
         {
             try
             {
                 //Proceed action, to update group name.
                 session.CreateQuery("Update Groups set GroupName =:groupname where UserId = :userid")
                 .SetParameter("groupname", group.GroupName)
                 .SetParameter("userid", group.UserId)
                 .ExecuteUpdate();
                 transaction.Commit();
             }
             catch (Exception ex)
             {
                 Console.WriteLine(ex.StackTrace);
                 // return 0;
             }
         } //End Transaction
     }     //End Session
 }
Esempio n. 7
0
 /// <DeleteGroup>
 /// Delete a group of user by profile id , group id and profile id.
 /// </summary>
 /// <param name="group">Set the group name and user id in a Groups Class Property and Pass the same Object of Groups Class.(Domain.Groups)</param>
 /// <returns>Return 1 when Data  is deleted Otherwise retun 0. (int)</returns>
 public int DeleteGroup(Domain.Socioboard.Domain.Groups group)
 {
     //Creates a database connection and opens up a session
     using (NHibernate.ISession session = SessionFactory.GetNewSession())
     {
         //After Session creation, start Transaction.
         using (NHibernate.ITransaction transaction = session.BeginTransaction())
         {
             try
             {
                 //Proceed action, to delete the group data.
                 NHibernate.IQuery query = session.CreateQuery("delete from Groups where UserId = :userid and GroupName = :name")
                                           .SetParameter("name", group.GroupName)
                                           .SetParameter("userid", group.UserId);
                 int isUpdated = query.ExecuteUpdate();
                 transaction.Commit();
                 return(isUpdated);
             }
             catch (Exception ex)
             {
                 Console.WriteLine(ex.StackTrace);
                 return(0);
             }
         } //End Transaction
     }     //End Session
 }
        public ActionResult AddGroup(string groupname)
        {
            User objUser = (User)Session["User"];

            Socioboard.Api.Groups.Groups    objApiGroups = new Socioboard.Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objgroup     = (Domain.Socioboard.Domain.Groups)(new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize(objApiGroups.AddGroup(groupname, objUser.Id.ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            return(Content(objgroup.Id.ToString()));
        }
Esempio n. 9
0
        public ActionResult FacebookLike(string fbid, string profileid, string msgid)
        {
            Api.Groups.Groups ApiobjGroups                 = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups      = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.Facebook.Facebook           ApiobjFacebook = new Api.Facebook.Facebook();
            string ret = ApiobjFacebook.FacebookLike(msgid, profileid, fbid, objGroups.UserId.ToString());

            return(Content(ret));
        }
Esempio n. 10
0
        public ActionResult YoutubeChannelVideos(string profileid)
        {
            //List<object> lstobject = new List<object>();
            //Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
            //Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            //Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            //Api.Youtube.Youtube ApiobjYoutube = new Api.Youtube.Youtube();
            //string channeldetails = ApiobjYoutube.GetYoutubeChannelVideos(objGroups.UserId.ToString(), profileid);
            //JObject obj = JObject.Parse(channeldetails);
            //JArray array = (JArray)obj["items"];

            //foreach (var item in array)
            //{
            //    try
            //    {
            //        lstobject.Add(item["snippet"]["thumbnails"]["maxres"]["url"].ToString());
            //    }
            //    catch (Exception ex)
            //    {
            //        Console.WriteLine(ex.StackTrace);
            //    }
            //}
            //dictwallposts.Add("youtube", lstobject);
            //return PartialView("_ImagePartial", dictwallposts);

            object        lstobject  = new object();
            List <object> lstComment = null;
            Dictionary <string, Dictionary <object, List <object> > > dictwallposts = new Dictionary <string, Dictionary <object, List <object> > >();
            Dictionary <object, List <object> > dic_youtube = new Dictionary <object, List <object> >();

            Api.Groups.Groups ApiobjGroups                = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups     = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.Youtube.Youtube             ApiobjYoutube = new Api.Youtube.Youtube();
            string  channeldetails = ApiobjYoutube.GetYoutubeChannelVideos(objGroups.UserId.ToString(), profileid);
            JObject obj            = JObject.Parse(channeldetails);
            JArray  array          = (JArray)obj["items"];

            foreach (var item in array)
            {
                try
                {
                    lstComment = new List <object>();
                    lstobject  = (object)item["snippet"]["thumbnails"]["maxres"]["url"].ToString();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
                dic_youtube.Add(lstobject, lstComment);
            }
            dictwallposts.Add("youtube", dic_youtube);
            return(PartialView("_ImagePartial", dictwallposts));
        }
Esempio n. 11
0
        private void UpdateTeam(string EmailId, string userid, string username)
        {
            Domain.Socioboard.Domain.Groups      objGroups = objGroupsRepository.getGroupDetails(Guid.Parse(userid), ConfigurationManager.AppSettings["DefaultGroupName"]);
            List <Domain.Socioboard.Domain.Team> lstTeam   = objTeamRepository.GetAllTeamOfUserEmail(EmailId, objGroups.Id);

            foreach (var team in lstTeam)
            {
                Team objTeam = new Team();
                objTeam.UpdateTeam(userid, team.Id.ToString(), username);
                AddTeamMembers(team.GroupId.ToString(), team.Id.ToString());
            }
        }
Esempio n. 12
0
        private static Domain.Socioboard.Domain.Groups AddGroupByUserId(Guid userId)
        {
            Domain.Socioboard.Domain.Groups groups = new Domain.Socioboard.Domain.Groups();
            GroupsRepository objGroupRepository    = new GroupsRepository();

            groups.Id        = Guid.NewGuid();
            groups.GroupName = ConfigurationManager.AppSettings["DefaultGroupName"];
            groups.UserId    = userId;
            groups.EntryDate = DateTime.Now;

            objGroupRepository.AddGroup(groups);
            return(groups);
        }
Esempio n. 13
0
 /// <AddGroup>
 /// Add a new group
 /// </summary>
 /// <param name="group">Set Values in a Groups Class Property and Pass the same Object of Groups Class.(Domain.Groups)</param>
 public void AddGroup(Domain.Socioboard.Domain.Groups group)
 {
     //Creates a database connection and opens up a session
     using (NHibernate.ISession session = SessionFactory.GetNewSession())
     {
         //After Session creation, start Transaction.
         using (NHibernate.ITransaction transaction = session.BeginTransaction())
         {
             //Proceed action to save data.
             session.Save(group);
             transaction.Commit();
         } //End Transaction
     }     //End Session
 }
        public IHttpActionResult AddGroup(Domain.Socioboard.Domain.Groups group)
        {
            try
            {
                // GroupRepository grouprepo = new GroupRepository();
                if (!grouprepo.checkGroupExists(group.UserId, group.GroupName))
                {
                    // Domain.Socioboard.Domain.Groups group = new Domain.Socioboard.Domain.Groups();
                    group.EntryDate = DateTime.UtcNow;
                    group.Id        = Guid.NewGuid();
                    grouprepo.AddGroup(group);
                    //code to add admin as group member
                    Domain.Socioboard.Domain.User objUser = objUserRepository.getUsersById(group.UserId);

                    Domain.Socioboard.Domain.Groupmembers grpMember = new Domain.Socioboard.Domain.Groupmembers();
                    grpMember.Id      = Guid.NewGuid();
                    grpMember.Groupid = group.Id.ToString();
                    grpMember.Userid  = group.UserId.ToString();
                    grpMember.Status  = Domain.Socioboard.Domain.GroupUserStatus.Accepted;
                    grpMember.Emailid = objUser.EmailId;
                    grpMember.IsAdmin = true;
                    grpMemberRepo.AddGroupMemeber(grpMember);


                    Api.Socioboard.Services.BusinessSetting  ApiobjBusinesssSetting = new Api.Socioboard.Services.BusinessSetting();
                    Domain.Socioboard.Domain.BusinessSetting ObjBsnsStng            = new Domain.Socioboard.Domain.BusinessSetting();
                    ObjBsnsStng.Id               = Guid.NewGuid();
                    ObjBsnsStng.BusinessName     = group.GroupName;
                    ObjBsnsStng.GroupId          = group.Id;
                    ObjBsnsStng.AssigningTasks   = false;
                    ObjBsnsStng.TaskNotification = false;
                    ObjBsnsStng.FbPhotoUpload    = 0;
                    ObjBsnsStng.UserId           = group.UserId;
                    ObjBsnsStng.EntryDate        = DateTime.Now;
                    string ObjBsnsStg  = (new JavaScriptSerializer().Serialize(ObjBsnsStng));
                    string BsnsMessage = ApiobjBusinesssSetting.AddBusinessByUser(ObjBsnsStg);
                    //return new JavaScriptSerializer().Serialize(group);
                    return(Ok("Added Sucessfully"));
                }
                else
                {
                    return(BadRequest("Group Exist."));
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return(BadRequest("Group Exist."));
            }
        }
 public IHttpActionResult GetGroupDetailsByGroupId(string GroupId)
 {
     try
     {
         Domain.Socioboard.Domain.Groups objGroups = grouprepo.getGroupName(Guid.Parse(GroupId));
         return(Ok(objGroups));
     }
     catch (Exception ex)
     {
         logger.Error(ex.Message);
         logger.Error(ex.StackTrace);
         return(BadRequest("Something Went Wrong"));
     }
 }
        public IHttpActionResult GetGroupsOfUser(string UserId)
        {
            List <Domain.Socioboard.Domain.Groupmembers> lstGroupMember = new List <Domain.Socioboard.Domain.Groupmembers>();
            List <Domain.Socioboard.Domain.Groups>       lstGroups      = new List <Domain.Socioboard.Domain.Groups>();

            lstGroupMember = grpMemberRepo.GetUserGroupmembers(UserId);
            foreach (var member in lstGroupMember)
            {
                Domain.Socioboard.Domain.Groups group = grouprepo.getGroupById(Guid.Parse(member.Groupid));
                if (group != null)
                {
                    lstGroups.Add(group);
                }
            }
            return(Ok(lstGroups));
        }
Esempio n. 17
0
        public ActionResult LinkedinFeeds(string profileid)
        {
            List <object> lstobject = new List <object>();
            Dictionary <string, List <object> > dictwallposts = new Dictionary <string, List <object> >();

            Api.Groups.Groups ApiobjGroups                 = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups      = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.Linkedin.Linkedin           ApiobjLinkedin = new Api.Linkedin.Linkedin();
            List <Domain.Socioboard.Domain.LinkedInUser.User_Updates> lstlinkedinFeeds = (List <Domain.Socioboard.Domain.LinkedInUser.User_Updates>)(new JavaScriptSerializer().Deserialize(ApiobjLinkedin.GetLinkedUserUpdates(profileid, objGroups.UserId.ToString()), typeof(List <Domain.Socioboard.Domain.LinkedInUser.User_Updates>)));

            foreach (var linkledinfeed in lstlinkedinFeeds)
            {
                lstobject.Add(linkledinfeed);
            }
            dictwallposts.Add("linkedin", lstobject);
            return(PartialView("_Panel2Partial", dictwallposts));
        }
Esempio n. 18
0
        public ActionResult TwitterFeeds(string profileid)
        {
            List <object> lstobject = new List <object>();
            Dictionary <string, List <object> > dictwallposts = new Dictionary <string, List <object> >();

            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups   objGroups            = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List <TwitterMessage>             lstTwitterMessage    = (List <TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.GetTwitterMessages(profileid, objGroups.UserId.ToString()), typeof(List <TwitterMessage>)));

            foreach (var twittermsg in lstTwitterMessage)
            {
                lstobject.Add(twittermsg);
            }
            dictwallposts.Add("twitter", lstobject);
            return(PartialView("_Panel2Partial", dictwallposts));
        }
Esempio n. 19
0
        public ActionResult TwitterMentions(string ProfileId)
        {
            List <object> lstobject = new List <object>();
            Dictionary <string, List <object> > dictMentions = new Dictionary <string, List <object> >();

            Api.Groups.Groups ApiobjGroups            = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));

            Api.TwitterMessage.TwitterMessage ApiobjTwitterMessage = new Api.TwitterMessage.TwitterMessage();
            List <TwitterMessage>             lstTwitterMentions   = (List <TwitterMessage>)(new JavaScriptSerializer().Deserialize(ApiobjTwitterMessage.getAllTwitterMentionsOfUsers(objGroups.UserId.ToString(), ProfileId), typeof(List <TwitterMessage>)));

            foreach (var twitterMentions in lstTwitterMentions)
            {
                lstobject.Add(twitterMentions);
            }
            dictMentions.Add("twitter", lstobject);
            return(PartialView("_Panel3Partial", dictMentions));
        }
Esempio n. 20
0
        public ActionResult FacebookTag(string ProfileId)
        {
            List <object> lstobject = new List <object>();
            Dictionary <string, List <object> > dictTag = new Dictionary <string, List <object> >();

            Api.Groups.Groups ApiobjGroups            = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));

            Api.FacebookMessage.FacebookMessage ApiobjFacebookMessage = new Api.FacebookMessage.FacebookMessage();
            List <FacebookMessage> lstFacebookTag = (List <FacebookMessage>)(new JavaScriptSerializer().Deserialize(ApiobjFacebookMessage.getAllFacebookTagOfUsers(objGroups.UserId.ToString(), ProfileId), typeof(List <FacebookMessage>)));

            foreach (var FacebookTag in lstFacebookTag)
            {
                lstobject.Add(FacebookTag);
            }
            dictTag.Add("facebook", lstobject);
            return(PartialView("_Panel3Partial", dictTag));
        }
Esempio n. 21
0
        //Edited by Sumit Gupta
        public ActionResult scheduler(string network, string profileid)
        {
            List <ScheduledMessage> objScheduledMessage = new List <ScheduledMessage>();
            //Dictionary<object, List<ScheduledMessage>> dictscheduler = new Dictionary<object, List<ScheduledMessage>>();
            Dictionary <string, List <object> > dictscheduler = new Dictionary <string, List <object> >();

            Api.Groups.Groups ApiobjGroups            = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            if (network == "facebook")
            {
                Api.FacebookAccount.FacebookAccount ApiobjFacebookAccount = new Api.FacebookAccount.FacebookAccount();
                FacebookAccount objFacebookAccount = (FacebookAccount)(new JavaScriptSerializer().Deserialize(ApiobjFacebookAccount.getFacebookAccountDetailsById(objGroups.UserId.ToString(), profileid.ToString()), typeof(FacebookAccount)));
                Api.ScheduledMessage.ScheduledMessage ApiobjScheduledMessage = new Api.ScheduledMessage.ScheduledMessage();
                objScheduledMessage = (List <ScheduledMessage>)(new JavaScriptSerializer().Deserialize(ApiobjScheduledMessage.GetAllUnSentMessagesAccordingToGroup(objGroups.UserId.ToString(), profileid.ToString(), network), typeof(List <ScheduledMessage>)));
                //dictscheduler.Add(objFacebookAccount, objScheduledMessage);
            }
            else if (network == "twitter")
            {
                Api.TwitterAccount.TwitterAccount ApiobjTwitterAccount = new Api.TwitterAccount.TwitterAccount();
                TwitterAccount objTwitterAccount = (TwitterAccount)(new JavaScriptSerializer().Deserialize(ApiobjTwitterAccount.GetTwitterAccountDetailsById(objGroups.UserId.ToString(), profileid.ToString()), typeof(TwitterAccount)));
                Api.ScheduledMessage.ScheduledMessage ApiobjScheduledMessage = new Api.ScheduledMessage.ScheduledMessage();
                objScheduledMessage = (List <ScheduledMessage>)(new JavaScriptSerializer().Deserialize(ApiobjScheduledMessage.GetAllUnSentMessagesAccordingToGroup(objGroups.UserId.ToString(), profileid.ToString(), network), typeof(List <ScheduledMessage>)));
                //dictscheduler.Add(objTwitterAccount, objScheduledMessage);
            }
            else if (network == "linkedin")
            {
                Api.LinkedinAccount.LinkedinAccount ApiobjLinkedinAccount = new Api.LinkedinAccount.LinkedinAccount();
                LinkedInAccount objLinkedInAccount = (LinkedInAccount)(new JavaScriptSerializer().Deserialize(ApiobjLinkedinAccount.GetLinkedinAccountDetailsById(objGroups.UserId.ToString(), profileid.ToString()), typeof(LinkedInAccount)));
                Api.ScheduledMessage.ScheduledMessage ApiobjScheduledMessage = new Api.ScheduledMessage.ScheduledMessage();
                objScheduledMessage = (List <ScheduledMessage>)(new JavaScriptSerializer().Deserialize(ApiobjScheduledMessage.GetAllUnSentMessagesAccordingToGroup(objGroups.UserId.ToString(), profileid.ToString(), network), typeof(List <ScheduledMessage>)));
                //dictscheduler.Add(objLinkedInAccount, objScheduledMessage);
            }

            List <object> lstObject = new List <object>();

            foreach (var item in objScheduledMessage)
            {
                lstObject.Add(item);
            }

            dictscheduler.Add(network, lstObject);

            return(PartialView("_Panel3Partial", dictscheduler));
        }
Esempio n. 22
0
        public ActionResult InstagramImages(string profileid)
        {
            //List<object> lstobject = new List<object>();
            //Dictionary<string, List<object>> dictwallposts = new Dictionary<string, List<object>>();
            //Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            //Domain.Socioboard.Domain.Groups objGroups = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            //Api.InstagramFeed.InstagramFeed ApiobjInstagramFeed = new Api.InstagramFeed.InstagramFeed();
            //List<Domain.Socioboard.Domain.InstagramFeed> lstInstagramFeed = (List<Domain.Socioboard.Domain.InstagramFeed>)(new JavaScriptSerializer().Deserialize(ApiobjInstagramFeed.GetLinkedInFeeds(objGroups.UserId.ToString(), profileid), typeof(List<Domain.Socioboard.Domain.InstagramFeed>)));
            //foreach (var lstInstagramfeed in lstInstagramFeed)
            //{
            //    lstobject.Add(lstInstagramfeed);
            //}
            //dictwallposts.Add("instagram", lstobject);
            //return PartialView("_ImagePartial", dictwallposts);


            object        lstobject  = new object();
            List <object> lstComment = null;

            Dictionary <string, Dictionary <object, List <object> > > dictwallposts = new Dictionary <string, Dictionary <object, List <object> > >();
            Dictionary <object, List <object> > dic_InstgramImg = new Dictionary <object, List <object> >();

            Api.Groups.Groups ApiobjGroups = new Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups       objGroups                  = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            Api.InstagramFeed.InstagramFeed       ApiobjInstagramFeed        = new Api.InstagramFeed.InstagramFeed();
            Api.InstagramComment.InstagramComment ApiobjInstagramFeedComment = new Api.InstagramComment.InstagramComment();

            List <Domain.Socioboard.Domain.InstagramFeed> lstInstagramFeed = (List <Domain.Socioboard.Domain.InstagramFeed>)(new JavaScriptSerializer().Deserialize(ApiobjInstagramFeed.GetLinkedInFeeds(objGroups.UserId.ToString(), profileid), typeof(List <Domain.Socioboard.Domain.InstagramFeed>)));

            foreach (var item_lstInstagramfeed in lstInstagramFeed)
            {
                lstComment = new List <object>();
                List <Domain.Socioboard.Domain.InstagramComment> lstInstagramComment = (List <Domain.Socioboard.Domain.InstagramComment>)(new JavaScriptSerializer().Deserialize(ApiobjInstagramFeedComment.GetInstagramFeedsComment(objGroups.UserId.ToString(), item_lstInstagramfeed.FeedId.ToString()), typeof(List <Domain.Socioboard.Domain.InstagramComment>)));

                foreach (var item in lstInstagramComment)
                {
                    lstComment.Add(item);
                }
                lstobject = (object)item_lstInstagramfeed;
                dic_InstgramImg.Add(lstobject, lstComment);
            }
            dictwallposts.Add("instagram", dic_InstgramImg);
            return(PartialView("_ImagePartial", dictwallposts));
        }
Esempio n. 23
0
        public ActionResult LikeUnlikeInstagramPost(FormCollection _FormCollection)
        {
            string LikeCount   = _FormCollection["LikeCount"];
            string IsLike      = _FormCollection["IsLike"];
            string FeedId      = _FormCollection["FeedId"];
            string InstagramId = _FormCollection["InstagramId"];

            try
            {
                Api.Groups.Groups ApiobjGroups                  = new Api.Groups.Groups();
                Domain.Socioboard.Domain.Groups objGroups       = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
                Api.Instagram.Instagram         ApiobjInstagram = new Api.Instagram.Instagram();
                string ret = ApiobjInstagram.InstagramLikeUnLike(LikeCount, IsLike, FeedId, InstagramId, objGroups.UserId.ToString());
                return(Content(ret));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }

            return(Content("success"));
        }
        //
        // GET: /BusinessSetting/

        public ActionResult Index()
        {
            if (Session["User"] != null)
            {
                Guid GroupId = Guid.Parse(Session["group"].ToString());
                Socioboard.Api.Groups.Groups    ApiobjGroup = new Socioboard.Api.Groups.Groups();
                Domain.Socioboard.Domain.Groups ObjGroup    = (Domain.Socioboard.Domain.Groups)(new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize(ApiobjGroup.GetGroupDetailsByGroupId(GroupId.ToString()), typeof(Domain.Socioboard.Domain.Groups)));
                if (ObjGroup.GroupName == ConfigurationManager.AppSettings["DefaultGroupName"].ToString())
                {
                    //return Content("Default Group Can't Access");
                    ViewBag.DefaultFroup = "DefaultGroup";
                    return(View());
                }
                else
                {
                    return(View());
                }
            }
            else
            {
                return(RedirectToAction("Index", "Index"));
            }
        }
Esempio n. 25
0
        public Domain.Socioboard.Domain.Groups getGroupById(Guid GroupId)
        {
            using (NHibernate.ISession session = SessionFactory.GetNewSession())
            {
                //After Session creation, start Transaction.
                using (NHibernate.ITransaction transaction = session.BeginTransaction())
                {
                    try
                    {
                        NHibernate.IQuery query = session.CreateQuery("from Groups where Id=:GroupId");

                        query.SetParameter("GroupId", GroupId);
                        Domain.Socioboard.Domain.Groups grou = query.UniqueResult <Domain.Socioboard.Domain.Groups>();
                        return(grou);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.StackTrace);
                        return(null);
                    }
                } //End Transaction
            }     //End Session
        }
Esempio n. 26
0
        public string Register(string EmailId, string Password, string AccountType, string Username, string ActivationStatus = "0")
        {
            try
            {
                //UserRepository userrepo = new UserRepository();

                //Domain.Socioboard.Domain.UserActivation objUserActivation = new Domain.Socioboard.Domain.UserActivation();
                //UserActivationRepository objUserActivation = new UserActivationRepository();

                logger.Error("Register");

                if (!userrepo.IsUserExist(EmailId))
                {
                    Domain.Socioboard.Domain.User user = new Domain.Socioboard.Domain.User();
                    user.AccountType      = AccountType;
                    user.EmailId          = EmailId;
                    user.CreateDate       = DateTime.Now;
                    user.ExpiryDate       = DateTime.Now.AddMonths(1);
                    user.Password         = Utility.MD5Hash(Password);
                    user.PaymentStatus    = "unpaid";
                    user.ProfileUrl       = string.Empty;
                    user.TimeZone         = string.Empty;
                    user.UserName         = Username;//FirstName + " " + LastName;
                    user.UserStatus       = 1;
                    user.Ewallet          = "0";
                    user.ActivationStatus = ActivationStatus;//"0";
                    user.Id       = Guid.NewGuid();
                    user.UserCode = Utility.GenerateRandomUniqueString();
                    UserRepository.Add(user);

                    ////add value in UserActivation
                    //UserActivation.AddUserActivation(user);

                    //add value in userpackage
                    // UserPackageRelation.AddUserPackageRelation(user);


                    try
                    {
                        Domain.Socioboard.Domain.Groups groups = AddGroupByUserId(user.Id);


                        BusinessSettingRepository busnrepo = new BusinessSettingRepository();
                        BusinessSetting.AddBusinessSetting(user.Id, groups.Id, groups.GroupName);
                        Team.AddTeamByGroupIdUserId(user.Id, user.EmailId, groups.Id);

                        UpdateTeam(EmailId, user.Id.ToString(), user.UserName);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                        logger.Error("Error : " + ex.Message);
                        logger.Error("Error : " + ex.StackTrace);
                    }


                    //MailSender.SendEMail(user.UserName, Password, EmailId);
                    return(new JavaScriptSerializer().Serialize(user));
                }
                else
                {
                    return("Email Already Exists");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return("Something Went Wrong");
            }
        }
Esempio n. 27
0
        private static Domain.Socioboard.Domain.Groups AddGroupByUserId(Guid userId)
        {
            Domain.Socioboard.Domain.Groups groups = new Domain.Socioboard.Domain.Groups();
            GroupsRepository objGroupRepository = new GroupsRepository();
            UserRepository userRepo = new UserRepository();
            GroupMembersRepository grpMemberRepo = new GroupMembersRepository();

            groups.Id = Guid.NewGuid();
            groups.GroupName = ConfigurationManager.AppSettings["DefaultGroupName"];
            groups.UserId = userId;
            groups.EntryDate = DateTime.UtcNow;

            objGroupRepository.AddGroup(groups);

            Domain.Socioboard.Domain.User objUser = userRepo.getUsersById(groups.UserId);
            Domain.Socioboard.Domain.Groupmembers grpMember = new Domain.Socioboard.Domain.Groupmembers();
            grpMember.Id = Guid.NewGuid();
            grpMember.Groupid = groups.Id.ToString();
            grpMember.Userid = groups.UserId.ToString();
            grpMember.Status = Domain.Socioboard.Domain.GroupUserStatus.Accepted;
            grpMember.Emailid = objUser.EmailId;
            grpMember.IsAdmin = true;
            grpMemberRepo.AddGroupMemeber(grpMember);


            return groups;
        }
Esempio n. 28
0
        public string RegisterbyTwitter(string EmailId, string Password, string AccountType, string Username, string SocioLogin, string PictureUrl, string ActivationStatus = "0")
        {
            try
            {
                logger.Error("RegisterbyTwitter");

                if (!userrepo.IsUserExist(EmailId))
                {
                    Domain.Socioboard.Domain.User user = new Domain.Socioboard.Domain.User();
                    user.AccountType = AccountType;
                    user.EmailId     = EmailId;
                    user.CreateDate  = DateTime.Now;
                    try
                    {
                        if (ConfigurationManager.AppSettings["expiryindays"].ToString() != "")
                        {
                            double expiryindays = double.Parse(ConfigurationManager.AppSettings["expiryindays"].ToString(), CultureInfo.InvariantCulture.NumberFormat);
                            user.ExpiryDate = DateTime.Now.AddDays(expiryindays);
                        }
                        else
                        {
                            user.ExpiryDate = DateTime.Now.AddDays(30);
                        }
                    }
                    catch (Exception)
                    {
                        user.ExpiryDate = DateTime.Now.AddDays(30);
                    }
                    user.Password         = Utility.MD5Hash(Password);
                    user.PaymentStatus    = "unpaid";
                    user.ProfileUrl       = string.Empty;
                    user.TimeZone         = string.Empty;
                    user.UserName         = Username;//FirstName + " " + LastName;
                    user.UserStatus       = 1;
                    user.Ewallet          = "0";
                    user.ActivationStatus = ActivationStatus;//"0";
                    user.Id          = Guid.NewGuid();
                    user.UserCode    = Utility.GenerateRandomUniqueString();
                    user.SocialLogin = SocioLogin;
                    user.ProfileUrl  = PictureUrl;
                    UserRepository.Add(user);

                    ////add value in UserActivation
                    //UserActivation.AddUserActivation(user);

                    //add value in userpackage
                    // UserPackageRelation.AddUserPackageRelation(user);


                    try
                    {
                        Domain.Socioboard.Domain.Groups groups = AddGroupByUserId(user.Id);


                        BusinessSettingRepository busnrepo = new BusinessSettingRepository();
                        BusinessSetting.AddBusinessSetting(user.Id, groups.Id, groups.GroupName);
                        Team.AddTeamByGroupIdUserId(user.Id, user.EmailId, groups.Id);

                        UpdateTeam(EmailId, user.Id.ToString(), user.UserName);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                        logger.Error("Error : " + ex.Message);
                        logger.Error("Error : " + ex.StackTrace);
                    }
                    //MailSender.SendEMail(user.UserName, Password, EmailId);
                    return(new JavaScriptSerializer().Serialize(user));
                }
                else
                {
                    return("Email Already Exists");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                return("Something Went Wrong");
            }
        }
Esempio n. 29
0
        private static Domain.Socioboard.Domain.Groups AddGroupByUserId(Guid userId)
        {
            Domain.Socioboard.Domain.Groups groups = new Domain.Socioboard.Domain.Groups();
            GroupsRepository objGroupRepository = new GroupsRepository();

            groups.Id = Guid.NewGuid();
            groups.GroupName = ConfigurationManager.AppSettings["DefaultGroupName"];
            groups.UserId = userId;
            groups.EntryDate = DateTime.Now;

            objGroupRepository.AddGroup(groups);
            return groups;
        }
 public IHttpActionResult DeleteGroupByName(Groups group)
 {
     try
     {
         int i = grouprepo.DeleteGroup(group);
         if (i == 1)
         {
             return Ok("Group Deleted Successfully");
         }
         else
         {
             return BadRequest("Invalid UserId");
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
         return BadRequest("Something Went Wrong");
     }
 }
Esempio n. 31
0
        public ActionResult LoadGroup()
        {
            User objUser = (User)Session["User"];
            Api.Groups.Groups objApiGroups = new Api.Groups.Groups();
            objApiGroups.Timeout = 300000;
            JArray profile = JArray.Parse(objApiGroups.GetGroupDetailsByUserId(objUser.Id.ToString()));

            List<Groups> lstgroup = new List<Groups>();
            foreach (var item in profile)
            {
                Groups objGroups = new Groups();
                objGroups.Id = Guid.Parse(Convert.ToString(item["Id"]));
                objGroups.GroupName = Convert.ToString(item["GroupName"]);
                objGroups.UserId = Guid.Parse(Convert.ToString(item["UserId"]));
                objGroups.EntryDate = Convert.ToDateTime(Convert.ToString(item["EntryDate"]));
                lstgroup.Add(objGroups);
            }

            return PartialView("_LoadGroupPartial", lstgroup);

        }
Esempio n. 32
0
        public ActionResult ComposeMessageSend(string message, string allprofiles, string curdaatetimetime)
        {
            User   objUser = (User)Session["User"];
            string groupid = Session["group"].ToString();

            Socioboard.Api.Groups.Groups    ApiobjGroups = new Socioboard.Api.Groups.Groups();
            Domain.Socioboard.Domain.Groups objGroups    = (Domain.Socioboard.Domain.Groups)(new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize(ApiobjGroups.GetGroupDetailsByGroupId(Session["group"].ToString()), typeof(Domain.Socioboard.Domain.Groups)));
            string[] profileandidarr = Regex.Split(allprofiles, "<:>");
            var      fi   = Request.Files["file"];
            string   file = string.Empty;


            //Get Dropbox Selected Images
            //string[] DropboxImg = null;
            //try
            //{
            //    DropboxImg = Request.Form["DropboxImg"].Split(',');
            //}
            //catch { };



            if (Request.Files.Count > 0)
            {
                if (fi != null)
                {
                    var path = Server.MapPath("~/Themes/" + System.Configuration.ConfigurationManager.AppSettings["domain"] + "/Contents/img/upload");

                    // var path = System.Configuration.ConfigurationManager.AppSettings["MailSenderDomain"]+"Contents/img/upload";
                    file = path + "\\" + fi.FileName;
                    if (!Directory.Exists(path))
                    {
                        Directory.CreateDirectory(path);
                    }
                    fi.SaveAs(file);
                    path = path + "\\" + fi.FileName;
                    logger.Error(path);
                }
            }
            foreach (var item in profileandidarr)
            {
                string[] profileandid = item.Split('~');
                string   profiletype  = profileandid[1];
                string   profileid    = profileandid[0];
                int      DBXCount     = 0;

DbxNext:

                //if (!string.IsNullOrEmpty(DropboxImg[0]))
                //{
                //if (DropboxImg.Count() != 0 && DropboxImg.Count() >= DBXCount)
                //{
                //    file = DropboxImg[DBXCount];
                //    DBXCount++;
                //}
                //}
                try
                {
                    if (profiletype == "facebook")
                    {
                        Api.Facebook.Facebook ApiobjFacebook = new Api.Facebook.Facebook();
                        ApiobjFacebook.FacebookComposeMessage(message, profileid, objGroups.UserId.ToString(), curdaatetimetime, file);
                    }
                    if (profiletype == "facebook_page")
                    {
                        Api.Facebook.Facebook ApiobjFacebook = new Api.Facebook.Facebook();
                        ApiobjFacebook.FacebookComposeMessageForPage(message, profileid, objGroups.UserId.ToString(), curdaatetimetime, file);
                    }

                    if (profiletype == "twitter")
                    {
                        Api.Twitter.Twitter ApiobjTwitter = new Api.Twitter.Twitter();
                        ApiobjTwitter.TwitterComposeMessage(message, profileid, objGroups.UserId.ToString(), curdaatetimetime, file);
                    }
                    if (profiletype == "linkedin")
                    {
                        Api.Linkedin.Linkedin ApiobjLinkedin = new Api.Linkedin.Linkedin();
                        ApiobjLinkedin.LinkedinComposeMessage(message, profileid, objGroups.UserId.ToString(), curdaatetimetime, file);
                    }
                    if (profiletype == "tumblr")
                    {
                        Api.Tumblr.Tumblr ApiobjTumblr = new Api.Tumblr.Tumblr();
                        ApiobjTumblr.TumblrComposeMessage(message, profileid, objGroups.UserId.ToString(), curdaatetimetime, file);
                    }


                    Api.ScheduledMessage.ScheduledMessage objAddComposeSentMessage = new Api.ScheduledMessage.ScheduledMessage();
                    objAddComposeSentMessage.AddComposeMessage(objGroups.UserId.ToString(), profileid, profiletype, message, file);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }

                //if (!string.IsNullOrEmpty(DropboxImg[0]))
                //{
                //    if (DBXCount < DropboxImg.Count())
                //    {
                //        goto DbxNext;
                //    }
                //}
            }
            return(Content(""));
        }