private void LoadTaskStatusToFlowLayout(int projectID) { ClearTaskStatus(); TaskStatuBLL taskStatuBLL = new TaskStatuBLL(); List <TaskStatu> taskStatus = taskStatuBLL.GetTaskStatus(projectID); if (taskStatus.Count > 0) { LoadTaskStatus(projectID, taskStatus); } else { MetroLabel lblNoTaskStatuText = new MetroLabel { Text = "No Any Task Statu.", Name = "lblNoTaskStatuText", FontSize = MetroFramework.MetroLabelSize.Medium, TextAlign = ContentAlignment.MiddleLeft, AutoSize = true, }; flTaskStatus.Controls.Add(lblNoTaskStatuText); } }
public void GetTasksOfProject() { ProjectBLL projectBll = new ProjectBLL(); List <Project> projects = projectBll.GetProjects(); TaskStatuBLL taskStatuBll = new TaskStatuBLL(); List <Task> tasks = new List <Task>(); int taskCount = -1; if (projects.Count > 0) { List <TaskStatu> taskStatus = taskStatuBll.GetTaskStatus(projects[0].ProjectID); if (taskStatus.Count > 0) { TaskBLL taskBll = new TaskBLL(); tasks = taskBll.GetProjectTasks(projects[0].ProjectID, taskStatus[0].TaskStatuID); if (tasks.Count > 0) { taskCount = tasks.Count; } } } Assert.AreEqual(tasks.Count, taskCount); }