Exemple #1
0
        public async Task <List <PcResponse> > GetListPc()
        {
            var result = new List <PcResponse>()
            {
                new PcResponse {
                    Id = "", Name = "--Lựa chọn--"
                }
            };

            var listPc = _tblPCService.GetAllActive().Select(p => new PcResponse
            {
                Id   = p.PCID.ToString(),
                Name = p.ComputerName + $"({p.IPAddress})"
            }).ToList();

            result.AddRange(listPc);

            return(await Task.FromResult(result));
        }
Exemple #2
0
 private List <tblPC> GetPCList()
 {
     return(_tblPCService.GetAllActive().ToList());
 }