Exemple #1
0
        /// <summary>
        /// UpdateTask
        /// </summary>
        /// <param name="task"></param>
        /// <param name="parentTask"></param>
        /// <returns></returns>
        public bool UpdateTask(TaskMangerContext task, ParentTaskMangerContext parentTask)
        {
            Task_Master tmContext = new Task_Master();

            tmContext.Task_ID     = task.Task_ID;
            tmContext.Parent_ID   = task.Parent_ID;
            tmContext.Task        = task.Task;
            tmContext.StartDate   = task.StartDate;
            tmContext.EndDate     = task.EndDate;
            tmContext.Priority    = task.Priority;
            tmContext.IsTaskEnded = task.IsTaskEnded;
            tmContext.ParentTask  = task.ParentTask;

            ParentTask_Master pmContext = new ParentTask_Master();

            pmContext.Parent_ID   = (int)task.Task_ID;
            pmContext.Parent_Task = task.Task;
            bool IsTaskUpdated;

            IsTaskUpdated = dataAccess.UpdateTask(tmContext, pmContext);
            return(IsTaskUpdated);
        }
        /// <summary>
        /// UpdateTask
        /// </summary>
        /// <param name="task"></param>
        /// <param name="parentTask"></param>
        /// <returns></returns>
        public bool UpdateTask(TaskMangerContext task, ParentTaskMangerContext parentTask)
        {
            Task_Master tmContext = new Task_Master();

            tmContext.Task_ID     = task.Task_ID;
            tmContext.Parent_ID   = task.Parent_ID;
            tmContext.Task        = task.Task;
            tmContext.Start_Date  = task.StartDate;
            tmContext.End_Date    = task.EndDate;
            tmContext.Priority    = task.Priority;
            tmContext.isTaskEnded = task.IsTaskEnded;
            tmContext.ParentTask  = task.ParentTask;
            tmContext.Project_ID  = Convert.ToInt32(task.ProjectID);
            tmContext.userID      = task.EmployeeId;
            ParentTask_Master pmContext = new ParentTask_Master();

            pmContext.Parent_ID   = (int)task.Task_ID;
            pmContext.Parent_Task = task.Task;
            bool IsTaskUpdated;

            IsTaskUpdated = dataAccess.UpdateTask(tmContext, pmContext);
            return(IsTaskUpdated);
        }
Exemple #3
0
        /// <summary>
        /// AddTask
        /// </summary>
        /// <param name="task"></param>
        /// <param name="parentTask"></param>
        /// <returns></returns>
        public bool AddTask(TaskMangerContext task, ParentTaskMangerContext parentTask)
        {
            bool IsTaskAdded;

            Task_Master tmContext = new Task_Master();

            tmContext.Task_ID     = task.Task_ID;
            tmContext.Parent_ID   = Convert.ToInt32(task.ParentTask);
            tmContext.Task        = task.Task;
            tmContext.StartDate   = task.StartDate;
            tmContext.EndDate     = task.EndDate;
            tmContext.Priority    = task.Priority;
            tmContext.IsTaskEnded = task.IsTaskEnded;
            tmContext.ParentTask  = task.ParentTask;

            ParentTask_Master pmContext = new ParentTask_Master();

            //pmContext.Parent_ID =(int) parentTask.Parent_ID;
            pmContext.Parent_Task = parentTask.Parent_Task;

            IsTaskAdded = dataAccess.AddTask(tmContext, pmContext);
            return(IsTaskAdded);
        }