public string GetAllTaskCommentByUserIdTaskId(string taskId, string userId) { // ArrayList arrList = new ArrayList(); string JStr = string.Empty; try { TaskCommentRepository objTaskCommentRepository = new TaskCommentRepository(); Domain.Socioboard.Domain.TaskComment objTask = new Domain.Socioboard.Domain.TaskComment(); List<Domain.Socioboard.Domain.TaskComment> arrList = new List<Domain.Socioboard.Domain.TaskComment>(); objTask.Id = Guid.Parse(taskId); objTask.UserId = Guid.Parse(userId); arrList = objTaskCommentRepository.getAllTasksCommentOfUser(objTask.Id,objTask.UserId); if (arrList.Count > 0) { JStr = new JavaScriptSerializer().Serialize(arrList); } else { JStr = "Data Not Found"; } } catch (Exception ex) { Console.WriteLine("Error : " + ex.StackTrace); } return JStr; }
public string AddTaskComment(string comment, string userId, string taskId, string commentDate, DateTime entryDate) { string status = ""; try { TaskCommentRepository taskrepo = new TaskCommentRepository(); Domain.Socioboard.Domain.TaskComment objTask = new Domain.Socioboard.Domain.TaskComment(); objTask.Id = new Guid(); objTask.UserId = Guid.Parse(userId); objTask.Comment = comment; objTask.TaskId = Guid.Parse(taskId); //objTask.CommentDate = Convert.ToDateTime(commentDate); objTask.CommentDate = DateTime.Now; objTask.EntryDate = DateTime.Now; taskrepo.addTaskComment(objTask); status = "Success"; } catch (Exception ex) { Console.WriteLine("Error : " + ex.StackTrace); } return new JavaScriptSerializer().Serialize(status); }
public string GetAllTaskCommentByUserIdTaskId(string taskId, string userId) { // ArrayList arrList = new ArrayList(); string JStr = string.Empty; try { TaskCommentRepository objTaskCommentRepository = new TaskCommentRepository(); Domain.Socioboard.Domain.TaskComment objTask = new Domain.Socioboard.Domain.TaskComment(); List <Domain.Socioboard.Domain.TaskComment> arrList = new List <Domain.Socioboard.Domain.TaskComment>(); objTask.Id = Guid.Parse(taskId); objTask.UserId = Guid.Parse(userId); arrList = objTaskCommentRepository.getAllTasksCommentOfUser(objTask.Id, objTask.UserId); if (arrList.Count > 0) { JStr = new JavaScriptSerializer().Serialize(arrList); } else { JStr = "Data Not Found"; } } catch (Exception ex) { Console.WriteLine("Error : " + ex.StackTrace); } return(JStr); }
public string AddTaskComment(string comment, string userId, string taskId, DateTime commentDate, DateTime entryDate) { string status = ""; try { TaskCommentRepository taskrepo = new TaskCommentRepository(); Domain.Socioboard.Domain.TaskComment objTask = new Domain.Socioboard.Domain.TaskComment(); objTask.Id = new Guid(); objTask.UserId = Guid.Parse(userId); objTask.Comment = comment; objTask.TaskId = Guid.Parse(taskId); objTask.CommentDate = commentDate; objTask.EntryDate = DateTime.Now; taskrepo.addTaskComment(objTask); status = "Success"; } catch (Exception ex) { Console.WriteLine("Error : " + ex.StackTrace); } return(new JavaScriptSerializer().Serialize(status)); }
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); } }
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)); }
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)); }
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"); }
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); } }
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); }
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); }
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); }
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"; }