Exemplo n.º 1
0
        public List <TruckTypeBLL> GetAllTrucksTypes()
        {
            List <TruckTypeBLL> list = null;

            try
            {
                list = TruckTypeDAL.GetAll();
                return(list);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        public TruckTypeBLL GetbyId(Guid Id)
        {
            List <TruckTypeBLL> list = null;

            try
            {
                TruckTypeBLL listActive = null;
                list = TruckTypeDAL.GetAll();
                if (list != null)
                {
                    listActive = (from c in list
                                  where c.Id == Id
                                  select c).Single <TruckTypeBLL>();
                    return(listActive);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(null);
        }
Exemplo n.º 3
0
        public List <TruckTypeBLL> GetActiveTrucksTypes()
        {
            List <TruckTypeBLL> list       = null;
            List <TruckTypeBLL> listActive = null;

            try
            {
                list = TruckTypeDAL.GetAll();
                if (list != null)
                {
                    listActive = (from c in list
                                  where c.Status == TruckStatus.Active
                                  select c).ToList <TruckTypeBLL>();
                    return(listActive);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(null);
        }
 public TruckTypeController(TruckTypeDAL truckTypeDAL)
 {
     this.truckTypeDAL = truckTypeDAL;
 }