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);
        }
Beispiel #2
0
        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 CreateNewTask(string description, string userid, Domain.Socioboard.Domain.Tasks task, string assigntoId, string comment)
        {
            string descritption = description;
            Guid idtoassign = Guid.Empty;
            idtoassign = Guid.Parse(assigntoId);

            Domain.Socioboard.Domain.Tasks objTask = task;
            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);
            }
        }
Beispiel #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");
        }
Beispiel #5
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);
            }
        }
Beispiel #6
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";
        }