예제 #1
0
 public async Task <int> GetDataCount()
 {
     using (var projectDao = new ProjectDao())
     {
         return(await projectDao.GetAllAsync().CountAsync());
     }
 }
예제 #2
0
 public async Task <bool> ExistsProject(Guid projectId)
 {
     using (IDAL.Master.IProjectDao projectDao = new ProjectDao())
     {
         return(await projectDao.GetAllAsync().AnyAsync(m => m.Id == projectId));
     }
 }
예제 #3
0
        public async Task <DTO.Master.ProjectDto> GetOneProjectById(Guid projectId)
        {
            using (IDAL.Master.IProjectDao projectDao = new ProjectDao())
            {
                return(await projectDao.GetAllAsync()
                       .Where(m => m.Id == projectId)
                       .Select(m => new DTO.Master.ProjectDto()
                {
                    Name = m.Name,

                    CreateTime = m.CreateTime,
                }).FirstAsync());
            }
        }
예제 #4
0
 public async Task <DTO.Master.ProjectDto> GetOneProjectById(Guid projectId)
 {
     using (IDAL.Master.IProjectDao projectDao = new ProjectDao())
     {
         return(await projectDao.GetAllAsync()
                .Where(m => m.Id == projectId)
                .Select(m => new DTO.Master.ProjectDto()
         {
             Name = m.Name,
             WBSCode = m.WBSCode,
             SmallaProject = m.SmallaProject,
             SmallWBSCode = m.SmallWBSCode,
             NitialApprovalFunds = m.NitialApprovalFunds,
             VoltageGrade = m.VoltageGrade,
             ProjectDepartment = m.ProjectDepartment,
             PickingPeople = m.PickingPeople,
             ContactNumber = m.ContactNumber,
             CreateTime = m.CreateTime,
         }).FirstAsync());
     }
 }