public List <TruckModelBLL> GetAllTrucks() { List <TruckModelBLL> list = null; try { list = TruckModelDAL.GetAll(); return(list); } catch (Exception ex) { throw ex; } }
public TruckModelBLL GetbyId(Guid Id) { List <TruckModelBLL> list = null; try { TruckModelBLL listActive = null; list = TruckModelDAL.GetAll(); if (list != null) { listActive = (from c in list where c.Id == Id select c).Single <TruckModelBLL>(); return(listActive); } } catch (Exception ex) { throw ex; } return(null); }
public List <TruckModelBLL> GetAllTrucksByTypeId(Guid Id) { List <TruckModelBLL> list = null; try { List <TruckModelBLL> listActive = null; list = TruckModelDAL.GetAll(); if (list != null) { listActive = (from c in list where c.TruckTypeId == Id select c).ToList <TruckModelBLL>(); return(listActive); } } catch (Exception ex) { throw ex; } return(null); }
public List <TruckModelBLL> GetActiveTrucks() { List <TruckModelBLL> list = null; try { List <TruckModelBLL> listActive = null; list = TruckModelDAL.GetAll(); if (list != null) { listActive = (from c in list where c.Status == TruckStatus.Active select c).ToList <TruckModelBLL>(); return(listActive); } } catch (Exception ex) { throw ex; } return(null); }