public GeneralReportCrudFactory() { GeneralReportMapperInstance = new GeneralReportMapper(); StoreMapperInstance = new StoreMapper(); GateMapperInstance = new GateMapper(); dao = SqlDao.GetInstance(); }
public List <T> RetrieveUnavailableGates <T>(string id) { GateMapper gateMapper = new GateMapper(); var listGates = new List <T>(); var lstResult = dao.ExecuteQueryProcedure(gateMapper.GetRetrieveStatementUnavailableGatesByAirportId(id)); var dic = new Dictionary <string, object>(); if (lstResult.Count > 0) { var objs = gateMapper.BuildObjects(lstResult); foreach (var c in objs) { listGates.Add((T)Convert.ChangeType(c, typeof(T))); } } return(listGates); }
public static FileAccessTreeDto MapToDto(FileAccessTree fileAccessTree) { if (fileAccessTree == null) { return(null); } var fileAccessTreeDto = new FileAccessTreeDto { AccessTreeId = fileAccessTree.AccessTreeId, Gate = GateMapper.MapToDto(fileAccessTree.Gate), File = FileMapper.MapToDto(fileAccessTree.File), FileAttribute = FileAttributeMapper.MapToDto(fileAccessTree.FileAttribute), Children = new List <FileAccessTreeDto>() }; foreach (var child in fileAccessTree.Children) { fileAccessTreeDto.Children.Add(MapToDto(child)); } return(fileAccessTreeDto); }
public GateCrudFactory() { mapper = new GateMapper(); dao = SqlDao.GetInstance(); }