Esempio n. 1
0
        public void CreateNewTaskForAnroid(string description, string userid, string assigntoId, string comment)
        {
            string descritption = description;
            Guid idtoassign = Guid.Empty;
            idtoassign = Guid.Parse(assigntoId);

            Domain.Socioboard.Domain.Tasks objTask = new Domain.Socioboard.Domain.Tasks();
            TaskRepository objTaskRepo = new TaskRepository();
            objTask.AssignDate = DateTime.Now.ToString("yyyy-MM-dd H:mm:ss").ToString();
            objTask.AssignTaskTo = idtoassign;
            objTask.TaskStatus = false;
            objTask.TaskMessage = descritption;
            objTask.UserId = Guid.Parse(userid);
            Guid taskid = Guid.NewGuid();
            objTask.Id = taskid;
            objTaskRepo.addTask(objTask);

            /////////////////       
            string Comment = comment;
            if (!string.IsNullOrEmpty(comment))
            {
                string curdate = DateTime.Now.ToString("yyyy-MM-dd H:mm:ss").ToString();
                Domain.Socioboard.Domain.TaskComment objcmt = new Domain.Socioboard.Domain.TaskComment();
                TaskCommentRepository objcmtRepo = new TaskCommentRepository();
                objcmt.Comment = comment;
                objcmt.CommentDate = DateTime.Now;
                objcmt.EntryDate = DateTime.Now;
                objcmt.Id = Guid.NewGuid();
                objcmt.TaskId = objTask.Id;
                objcmt.UserId = Guid.Parse(userid);
                objcmtRepo.addTaskComment(objcmt);
            }
        }
Esempio n. 2
0
        public string getAllTasksOfUserList(string userid, string groupid)
        {
            ArrayList TaskData = new ArrayList();
            List <Domain.Socioboard.Domain.Tasks> taskdata = new List <Domain.Socioboard.Domain.Tasks>();
            TaskRepository taskrepo = new TaskRepository();

            TaskData = taskrepo.getAllMyTasksOfUser(Guid.Parse(userid), Guid.Parse(groupid));
            foreach (Domain.Socioboard.Domain.Tasks item in TaskData)
            {
                taskdata.Add(item);
            }
            return(new JavaScriptSerializer().Serialize(TaskData));
        }
Esempio n. 3
0
        public string DeleteTask(string TaskId)
        {
            string ret = string.Empty;

            try
            {
                TaskRepository        objTaskRepo       = new TaskRepository();
                int                   res               = objTaskRepo.deleteTask(Guid.Parse(TaskId));
                TaskCommentRepository ObjTaskcomentRepo = new TaskCommentRepository();
                int                   i = ObjTaskcomentRepo.DeleteTaskCommentByTaskId(Guid.Parse(TaskId));

                ret = "Success";
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                ret = "Fail";
            }
            return(new JavaScriptSerializer().Serialize(ret));
        }
Esempio n. 4
0
        public string AddNewTaskWithGroupForApps(string description, string messagedate, string userid, string assigntoId, string comment, string groupid)
        {
            string descritption = description;
            Guid   idtoassign   = Guid.Empty;

            idtoassign = Guid.Parse(assigntoId);

            Domain.Socioboard.Domain.Tasks objTask = new Domain.Socioboard.Domain.Tasks();
            TaskRepository objTaskRepo             = new TaskRepository();

            //objTask.AssignDate = DateTime.Now.ToString("yyyy-MM-dd H:mm:ss").ToString();
            objTask.AssignDate      = DateTime.Now;
            objTask.AssignTaskTo    = idtoassign;
            objTask.TaskStatus      = false;
            objTask.TaskMessage     = descritption;
            objTask.TaskMessageDate = DateTime.Parse(messagedate).ToLocalTime();
            objTask.UserId          = Guid.Parse(userid);
            Guid taskid = Guid.NewGuid();

            objTask.Id      = taskid;
            objTask.GroupId = Guid.Parse(groupid);
            objTaskRepo.addTask(objTask);

            /////////////////
            string Comment = comment;

            if (!string.IsNullOrEmpty(comment))
            {
                string curdate = DateTime.Now.ToString("yyyy-MM-dd H:mm:ss").ToString();
                Domain.Socioboard.Domain.TaskComment objcmt = new Domain.Socioboard.Domain.TaskComment();
                TaskCommentRepository objcmtRepo            = new TaskCommentRepository();
                objcmt.Comment     = comment;
                objcmt.CommentDate = DateTime.Now;
                objcmt.EntryDate   = DateTime.Now;
                objcmt.Id          = Guid.NewGuid();
                objcmt.TaskId      = objTask.Id;
                objcmt.UserId      = Guid.Parse(userid);
                objcmtRepo.addTaskComment(objcmt);
            }
            return("success");
        }
Esempio n. 5
0
        public string UpdateTaskReadStatus(string TaskId, string UserId, string GroupId)
        {
            string ret = string.Empty;

            try
            {
                TaskRepository taskrepo = new TaskRepository();
                Guid           taskid   = Guid.Parse(TaskId);
                Guid           userid   = Guid.Parse(UserId);
                Guid           groupid  = Guid.Parse(GroupId);

                taskrepo.UpdateTaskReadStatus(taskid, userid, groupid);

                ret = "Success";
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                ret = "Fail";
            }
            return(new JavaScriptSerializer().Serialize(ret));
        }
Esempio n. 6
0
        public void CreateNewTaskForAnroid(string description, string userid, string assigntoId, string comment)
        {
            string descritption = description;
            Guid   idtoassign   = Guid.Empty;

            idtoassign = Guid.Parse(assigntoId);

            Domain.Socioboard.Domain.Tasks objTask = new Domain.Socioboard.Domain.Tasks();
            TaskRepository objTaskRepo             = new TaskRepository();

            //objTask.AssignDate = DateTime.Now.ToString("yyyy-MM-dd H:mm:ss").ToString();
            objTask.AssignDate   = DateTime.Now;
            objTask.AssignTaskTo = idtoassign;
            objTask.TaskStatus   = false;
            objTask.TaskMessage  = descritption;
            objTask.UserId       = Guid.Parse(userid);
            Guid taskid = Guid.NewGuid();

            objTask.Id = taskid;
            objTaskRepo.addTask(objTask);

            /////////////////
            string Comment = comment;

            if (!string.IsNullOrEmpty(comment))
            {
                string curdate = DateTime.Now.ToString("yyyy-MM-dd H:mm:ss").ToString();
                Domain.Socioboard.Domain.TaskComment objcmt = new Domain.Socioboard.Domain.TaskComment();
                TaskCommentRepository objcmtRepo            = new TaskCommentRepository();
                objcmt.Comment     = comment;
                objcmt.CommentDate = DateTime.Now;
                objcmt.EntryDate   = DateTime.Now;
                objcmt.Id          = Guid.NewGuid();
                objcmt.TaskId      = objTask.Id;
                objcmt.UserId      = Guid.Parse(userid);
                objcmtRepo.addTaskComment(objcmt);
            }
        }
Esempio n. 7
0
 public string GetAllTasks(string custid)
 {
     ArrayList taskdata = new ArrayList();
     TaskCommentRepository objTaskCmtRepo = new TaskCommentRepository();
     TaskRepository taskrepo = new TaskRepository();
     taskdata = taskrepo.getAllTasksOfUser(Guid.Parse(custid));
     return new JavaScriptSerializer().Serialize(taskdata);
 }
Esempio n. 8
0
        public string GetAllTeamTask(string userid, string groupid)
        {
            TaskRepository taskrepo = new TaskRepository();
            ArrayList TaskData = new ArrayList();

            TaskData = taskrepo.getAllTasksOfUser(Guid.Parse(userid), Guid.Parse(groupid));
            List<Domain.Socioboard.Domain.Tasks> taskdata = new List<Domain.Socioboard.Domain.Tasks>();
            foreach (Domain.Socioboard.Domain.Tasks item in TaskData)
            {
                taskdata.Add(item);
            }
            return new JavaScriptSerializer().Serialize(TaskData);
        }
 public IHttpActionResult DeleteUserDetails(string user)
 {
     GroupsRepository _GroupsRepository=new GroupsRepository();
     GroupMembersRepository _GroupMembersRepository = new GroupMembersRepository();
     GroupProfileRepository _GroupProfileRepository = new GroupProfileRepository();
     TaskRepository _TaskRepository = new TaskRepository();
     TaskCommentRepository _TaskCommentRepository = new TaskCommentRepository();
     InboxMessagesRepository _InboxMessagesRepository=new InboxMessagesRepository();
     FacebookAccountRepository _FacebookAccountRepository=new FacebookAccountRepository();
     GoogleAnalyticsAccountRepository _GoogleAnalyticsAccountRepository=new GoogleAnalyticsAccountRepository();
     GooglePlusAccountRepository _GooglePlusAccountRepository=new GooglePlusAccountRepository();
     InstagramAccountRepository _InstagramAccountRepository=new InstagramAccountRepository();
     LinkedInAccountRepository _LinkedInAccountRepository=new LinkedInAccountRepository();
     LinkedinCompanyPageRepository _LinkedinCompanyPageRepository=new LinkedinCompanyPageRepository();
     ScheduledMessageRepository _ScheduledMessageRepository=new ScheduledMessageRepository();
     SocialProfilesRepository _SocialProfilesRepository = new SocialProfilesRepository();
     TwitterAccountRepository _TwitterAccountRepository=new TwitterAccountRepository();
     TumblrAccountRepository _TumblrAccountRepository = new TumblrAccountRepository();
     YoutubeAccountRepository _YoutubeAccountRepository = new YoutubeAccountRepository();
     YoutubeChannelRepository _YoutubeChannelRepository = new YoutubeChannelRepository();
     try
     {
         Domain.Socioboard.Domain.User _User = userrepo.getUserInfoByEmail(user);
         if (_User != null)
         {
             List<Domain.Socioboard.Domain.Groups> lstGroups = _GroupsRepository.getAllGroups(_User.Id);
             foreach (Domain.Socioboard.Domain.Groups item_group in lstGroups)
             {
                 int i = _GroupMembersRepository.DeleteGroupMember(item_group.Id.ToString());
                 int j = _GroupProfileRepository.DeleteAllGroupProfile(item_group.Id);
                 bool rt = _GroupProfileRepository.DeleteGroupReport(item_group.Id);
                 int k = _TaskRepository.DeleteTaskOfGroup(item_group.Id);
             }
             int g = _GroupMembersRepository.DeleteGroupMemberByUserId(user);
             int h = _GroupsRepository.DeleteGroupsByUserid(_User.Id);
             int l = _TaskCommentRepository.DeleteTaskCommentByUserid(_User.Id);
             int m = _InboxMessagesRepository.DeleteInboxMessages(_User.Id);
             int n = _FacebookAccountRepository.DeleteAllFacebookAccount(_User.Id);
             int o = _GoogleAnalyticsAccountRepository.DeleteGoogleAnalyticsAccountByUserid(_User.Id);
             int p = _GooglePlusAccountRepository.DeleteGooglePlusAccountByUserid(_User.Id);
             int q = _InstagramAccountRepository.DeleteInstagramAccountByUserid(_User.Id);
             int r = _LinkedInAccountRepository.DeleteLinkedInAccountByUserid(_User.Id);
             int s = _LinkedinCompanyPageRepository.DeleteLinkedinCompanyPage(_User.Id);
             int t = _ScheduledMessageRepository.DeleteScheduledMessageByUserid(_User.Id);
             int u = _SocialProfilesRepository.DeleteSocialProfileByUserid(_User.Id);
             int v = _TwitterAccountRepository.DeleteTwitterAccountByUserid(_User.Id);
             int w = _TumblrAccountRepository.DeletetumblraccountByUserid(_User.Id);
             int x = _YoutubeAccountRepository.DeleteYoutubeAccount(_User.Id);
             int y = _YoutubeChannelRepository.DeleteYoutubeChannelByUserid(_User.Id);
             int z = userrepo.DeleteUser(_User.Id);
         }
         else {
             return Ok(false);
         }
     }
     catch (Exception ex)
     {
         return BadRequest(ex.StackTrace);
     }
     return Ok(true);
 }
Esempio n. 10
0
        public string DeleteTask(string TaskId)
        {
            string ret = string.Empty;
            try
            {
                TaskRepository objTaskRepo = new TaskRepository();
                int res= objTaskRepo.deleteTask(Guid.Parse(TaskId));
                TaskCommentRepository ObjTaskcomentRepo = new TaskCommentRepository();
                int i = ObjTaskcomentRepo.DeleteTaskCommentByTaskId(Guid.Parse(TaskId));

                    ret = "Success";
            }
            catch (Exception ex)
            {

                Console.WriteLine(ex.StackTrace);
                ret = "Fail";
            }
            return new JavaScriptSerializer().Serialize(ret);
        }
Esempio n. 11
0
        public string ChangeTaskStatus(string UserId, string TaskId, string Status)
        {
            string ret = string.Empty;
            try
            {
                Guid taskid = Guid.Parse(TaskId);
                bool status = bool.Parse(Status);
                if (status == true)
                    status = false;
                else
                    status = true;
                TaskRepository objTaskRepo = new TaskRepository();
                objTaskRepo.updateTaskStatus(taskid, Guid.Parse(UserId), status);
                ret = "Success";
            }
            catch (Exception ex)
            {

                Console.WriteLine(ex.StackTrace);
                ret = "Fail";
            }
            return new JavaScriptSerializer().Serialize(ret);
        }
Esempio n. 12
0
 public string getAllTasksCommentOfUserList(string taskid)
 {
     List<Domain.Socioboard.Domain.TaskComment> lstTaskComment = new List<Domain.Socioboard.Domain.TaskComment>();
     TaskRepository taskrepo = new TaskRepository();
     lstTaskComment = taskrepo.getAllTasksCommentOfUserList(Guid.Parse(taskid));
     return new JavaScriptSerializer().Serialize(lstTaskComment);
 }
Esempio n. 13
0
 public string getAllTasksCommentOfUser(string taskid)
 {
     ArrayList taskdata = new ArrayList();
     TaskRepository taskrepo = new TaskRepository();
     taskdata = taskrepo.getAllTasksCommentOfUser(Guid.Parse(taskid));
     return new JavaScriptSerializer().Serialize(taskdata);
 }
Esempio n. 14
0
        public string GetAllTaskByUserIdAndGroupId(string userid, string username, string profileurl, string days, string groupid)
        {
            UserRepository userrepo = new UserRepository();
            Guid UserId = Guid.Parse(userid);
            List<Domain.Socioboard.Domain.Tasks> taskdata = new List<Domain.Socioboard.Domain.Tasks>();
            List<Domain.Socioboard.Domain.TaskByUser> taskbyuser = new List<Domain.Socioboard.Domain.TaskByUser>();
            TaskByUser _TaskByUser = new TaskByUser();
            TaskRepository taskrepo = new TaskRepository();
            taskdata = taskrepo.getAllTasksOfUserBYDays(Guid.Parse(userid), Guid.Parse(groupid), Convert.ToInt32(days));
            foreach (var item in taskdata)
            {
                _TaskByUser.TaskMessage = item.TaskMessage;
                _TaskByUser.TaskStatus = item.TaskStatus;
                _TaskByUser.AssignDate = item.AssignDate;
                _TaskByUser.CompletionDate = item.CompletionDate;
                try
                {
                    if (UserId == item.AssignTaskTo)
                    {
                        _TaskByUser.AssignToUserName = username;
                    }
                    else
                    {
                        Domain.Socioboard.Domain.User User = userrepo.getUsersById(item.AssignTaskTo);
                        _TaskByUser.AssignToUserName = User.UserName;

                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
                try
                {
                    if (UserId == item.UserId)
                    {
                        _TaskByUser.AssignByUserName = username;
                    }
                    else
                    {
                        Domain.Socioboard.Domain.User User = userrepo.getUsersById(item.UserId);
                        _TaskByUser.AssignByUserName = User.UserName;

                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }

                _TaskByUser.days = Convert.ToInt32(days);
                _TaskByUser.UserName = username;
                _TaskByUser.ProfileUrl = profileurl;
                taskbyuser.Add(_TaskByUser);
            }
            return new JavaScriptSerializer().Serialize(taskbyuser);
        }
Esempio n. 15
0
        public string UpdateTasksByUserIdTaskId(string taskMessage, string assignTaskTo, string taskStatus, DateTime assignDate, string taskId, string userId)
        {
            string status = string.Empty;
            try
            {

                TaskRepository taskrepo = new TaskRepository();
                Domain.Socioboard.Domain.Tasks objTask = new Domain.Socioboard.Domain.Tasks();

                var Assign_Date = String.Format("{0:yyyy-M-d HH:mm:ss}", assignDate);
                //var Completion_Date = String.Format("{0:yyyy-M-d HH:mm:ss}", DateTime.Now);
                objTask.Id = Guid.Parse(taskId);
                objTask.UserId = Guid.Parse(userId);
                objTask.AssignDate = Convert.ToString(Assign_Date);
                //objTask.CompletionDate = DateTime.Parse(String.Format("{0:yyyy-M-d HH:mm:ss}", DateTime.Now));
                objTask.AssignTaskTo = Guid.Parse(assignTaskTo);
                objTask.TaskMessage = taskMessage;
                objTask.TaskStatus = Convert.ToBoolean(taskStatus);

                taskrepo.updateTask(objTask);

                status = "Success";
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error : " + ex.StackTrace);
            }
            return new JavaScriptSerializer().Serialize(status);
        }
Esempio n. 16
0
        public string UpdateTaskReadStatus(string TaskId, string UserId, string GroupId)
        {
            string ret = string.Empty;
            try
            {
                TaskRepository taskrepo = new TaskRepository();
                Guid taskid = Guid.Parse(TaskId);
                Guid userid = Guid.Parse(UserId);
                Guid groupid = Guid.Parse(GroupId);

                taskrepo.UpdateTaskReadStatus(taskid, userid, groupid);

                ret = "Success";
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
                ret = "Fail";
            }
            return new JavaScriptSerializer().Serialize(ret);
        }
Esempio n. 17
0
        public string AddNewTaskWithGroupForApps(string description, string messagedate, string userid, string assigntoId, string comment, string groupid)
        {
            string descritption = description;
            Guid idtoassign = Guid.Empty;
            idtoassign = Guid.Parse(assigntoId);

            Domain.Socioboard.Domain.Tasks objTask = new Domain.Socioboard.Domain.Tasks();
            TaskRepository objTaskRepo = new TaskRepository();
            //objTask.AssignDate = DateTime.Now.ToString("yyyy-MM-dd H:mm:ss").ToString();
            objTask.AssignDate = DateTime.Now;
            objTask.AssignTaskTo = idtoassign;
            objTask.TaskStatus = false;
            objTask.TaskMessage = descritption;
            objTask.TaskMessageDate = DateTime.Parse(messagedate).ToLocalTime();
            objTask.UserId = Guid.Parse(userid);
            Guid taskid = Guid.NewGuid();
            objTask.Id = taskid;
            objTask.GroupId = Guid.Parse(groupid);
            objTaskRepo.addTask(objTask);

            /////////////////       
            string Comment = comment;
            if (!string.IsNullOrEmpty(comment))
            {
                string curdate = DateTime.Now.ToString("yyyy-MM-dd H:mm:ss").ToString();
                Domain.Socioboard.Domain.TaskComment objcmt = new Domain.Socioboard.Domain.TaskComment();
                TaskCommentRepository objcmtRepo = new TaskCommentRepository();
                objcmt.Comment = comment;
                objcmt.CommentDate = DateTime.Now;
                objcmt.EntryDate = DateTime.Now;
                objcmt.Id = Guid.NewGuid();
                objcmt.TaskId = objTask.Id;
                objcmt.UserId = Guid.Parse(userid);
                objcmtRepo.addTaskComment(objcmt);
            }
            return "success";
        }