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;
        }
示例#3
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));
        }
示例#4
0
        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);
        }
示例#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.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);
            }
        }
 /// <addTaskComment>
 /// Add Task Comment
 /// </summary>
 /// <param name="taskcomment">Set Values in a taskcomment Class Property and Pass the Object of taskcomment Class.(Domein.taskcomment)</param>
 public void addTaskComment(Domain.Socioboard.Domain.TaskComment taskcomment)
 {
     //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(taskcomment);
             transaction.Commit();
         } //End Transaction
     }     //End Session
 }
示例#7
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");
        }
示例#8
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);
            }
        }
示例#9
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";
        }