Ejemplo n.º 1
0
        public List <TruckModelBLL> GetAllTrucks()
        {
            List <TruckModelBLL> list = null;

            try
            {
                list = TruckModelDAL.GetAll();
                return(list);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }