示例#1
0
        public DtoTftpServer GetAllTftpServers()
        {
            var tftpDto = new DtoTftpServer();

            tftpDto.TftpServers = new List <string>();
            var comServers = _uow.ClientComServerRepository.Get(x => x.IsTftpServer);

            foreach (var com in comServers)
            {
                tftpDto.TftpServers.Add(com.TftpInterfaceIp);
            }

            return(tftpDto);
        }
示例#2
0
        public DtoTftpServer GetComputerTftpServers(string mac)
        {
            var tftpDto = new DtoTftpServer();

            tftpDto.TftpServers = new List <string>();
            var computer   = _uow.ComputerRepository.Get(x => x.ImagingMac.ToUpper().Equals(mac.ToUpper())).FirstOrDefault();
            var comServers = new Workflows.GetCompTftpServers().Run(computer.Id);

            foreach (var com in comServers)
            {
                tftpDto.TftpServers.Add(com.TftpInterfaceIp);
            }

            return(tftpDto);
        }