コード例 #1
0
        public List <TaskModel> GetAll()
        {
            taskBusiness = new TaskBusiness();
            var result = taskBusiness.GetAll();

            return(result);
        }
コード例 #2
0
        private void DeveloperForm_Load(object sender, EventArgs e)
        {
            TaskBusiness _taskBusiness;

            _taskBusiness = new TaskBusiness();
            List <Entities.Task> taskList = _taskBusiness.GetAll();

            dgvTaskList.DataSource = taskList;
        }
コード例 #3
0
        private void TaskListForm_Load(object sender, EventArgs e)
        {
            dgvTask.DataSource = null;
            _businessTask      = new TaskBusiness();
            List <Entities.Task> taskList = _businessTask.GetAll();

            var list = (from s in taskList
                        select new
            {
                ID = s.ID,
                StartDate = s.BeginDate,
                EndDate = s.FinalDate,
                Employee = s.Employee.FirstName,
                Project = s.Project.Name,
                Status = s.Status,
                Description = s.Description
            }).ToList();

            dgvTask.DataSource = list;
        }