public static BOTask ConvertTaskToBOTask(CompanyManagementDataLayer.Task task)
        {
            BOTask boTask = new BOTask();

            boTask.TaskId          = task.TaskId;
            boTask.StatusId        = task.StatusId;
            boTask.TaskTittle      = task.TaskTittle;
            boTask.TaskDescription = task.TaskDescription;


            return(boTask);
        }
Exemplo n.º 2
0
 public void CreateTaskInProject(BOTask boTask, int projectID)
 {
     try
     {
         int status        = Convert.ToInt32(CMEnum.Status.Completed);
         int projectStatus = dataLayer.GetProjectStatus(projectID);
         if (projectStatus == status)
         {
             throw new Exception(CMBusinessResources.TaskNotCreatedCompletedProject);
         }
         CompanyManagementDataLayer.Task task = BusinessLayerHelper.ConvertBOTaskToTask(boTask);
         dataLayer.CreateTaskInProject(task, projectID);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }