public void CreateNewTask(string description, string userid, Domain.Myfashion.Domain.Tasks task, string assigntoId, string comment)
        {
            string descritption = description;
            Guid idtoassign = Guid.Empty;
            idtoassign = Guid.Parse(assigntoId);

            Domain.Myfashion.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.Myfashion.Domain.TaskComment objcmt = new Domain.Myfashion.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 AddTaskComment(string comment, string userId, string taskId, string commentDate, DateTime entryDate)
        {
            string status = "";
            try
            {

                TaskCommentRepository taskrepo = new TaskCommentRepository();
                Domain.Myfashion.Domain.TaskComment objTask = new Domain.Myfashion.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 AddTaskComment(string comment, string userId, string taskId, string commentDate, DateTime entryDate)
        {
            string status = "";

            try
            {
                TaskCommentRepository taskrepo = new TaskCommentRepository();
                Domain.Myfashion.Domain.TaskComment objTask = new Domain.Myfashion.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));
        }
Exemplo 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.Myfashion.Domain.Tasks objTask = new Domain.Myfashion.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.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.Myfashion.Domain.TaskComment objcmt = new Domain.Myfashion.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");
        }
Exemplo n.º 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.Myfashion.Domain.Tasks objTask = new Domain.Myfashion.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.Myfashion.Domain.TaskComment objcmt = new Domain.Myfashion.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 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.Myfashion.Domain.Tasks objTask = new Domain.Myfashion.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.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.Myfashion.Domain.TaskComment objcmt = new Domain.Myfashion.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";
        }