public BaseDataContainer GetDeviceList(int perid, int objTypeId) { BaseDataContainer container = new BaseDataContainer(); PersonelTDataAccess pDa = new PersonelTDataAccess(); var lst = pDa.GetDeviceList(perid, objTypeId); container.DeviceList = lst; return(container); }
public DeviceDto GetDevice(int transferId) { DeviceDto result = new DeviceDto(); PersonelTDataAccess pDa = new PersonelTDataAccess(); var lst = pDa.GetDeviceList(transferId); if (lst.Count > 0) { result = lst.FirstOrDefault(); } else { result.Response.AddBusinessException("there is no device", BusinessExceptionEnum.Validation); } return(result); }