Beispiel #1
0
 public VeiculosController()
 {
     veiculoDal   = new VeiculoDal();
     tipoDal      = new TipoDal();
     arquivodal   = new ArquivoDal();
     marcaDal     = new MarcaDal();
     anoModeloDal = new AnoModeloDal();
 }
Beispiel #2
0
        public HttpResponseMessage GetMarcas(string tipo, int?idEmpresa)
        {
            //Thread.Sleep(7000);
            MarcaDal d      = new MarcaDal();
            var      result = d.ListarByTipo(tipo, true, idEmpresa);

            return(Request.CreateResponse(HttpStatusCode.OK, result));
        }
Beispiel #3
0
        public ProductoBiz()
        {
            this.productoDal = FactoryDal <ProductoDal> .GetDal();

            this.materiaPrimaDal = FactoryDal <MateriaPrimaDal> .GetDal();

            this.marcaDal = FactoryDal <MarcaDal> .GetDal();

            this.unidadMedidaBiz = new UnidadMedidaBiz();
        }
Beispiel #4
0
 public VeiculosController()
 {
     veiculoDal     = new VeiculoDal();
     combustivelDal = new CombustivelDal();
     tipoDal        = new TipoDal();
     anoModeloDal   = new AnoModeloDal();
     marcaDal       = new MarcaDal();
     arquivoDal     = new ArquivoDal();
     empresaDal     = new EmpresaDal();
 }
 public JsonResult ListMarca(string tipo)
 {
     try
     {
         //Thread.Sleep(1500);
         MarcaDal md = new MarcaDal();
         return(Json(md.ListarByTipo(tipo, true, Constantes.IDEMPRESA).OrderBy(m => m.Nome), JsonRequestBehavior.AllowGet));
     }
     catch (Exception)
     {
         return(Json(false));
     }
 }
Beispiel #6
0
        public HttpResponseMessage GetVeiculosDestaque(int?idEmpresa)
        {
            MarcaDal mdc        = new MarcaDal();
            var      marcaCarro = mdc.ListarByTipo("carro", true, idEmpresa);
            MarcaDal mdm        = new MarcaDal();
            var      marcaMoto  = mdm.ListarByTipo("moto", true, idEmpresa);


            Random     rnd = new Random();
            VeiculoDal vd  = new VeiculoDal();
            IOrderedEnumerable <Veiculo> Items = vd.Listar(null, true, idEmpresa).AsEnumerable().OrderBy((i => rnd.Next()));

            var destaques = Items.Where(x => x.Arquivo.Nome != "_semfoto.jpg").Where(x => x.Destaque == true).Take(4);


            return(Request.CreateResponse(HttpStatusCode.OK, new { marcaCarro, marcaMoto, destaques }));
        }
        public ActionResult Index()
        {
            try
            {
                //BannerDal d = new BannerDal();
                //List<Banner> banners = d.Listar(true);

                Helpers.RegistraLogDeAcesso("HOME");

                //string versao_frame;
                //int arq_bits;
                //arq_bits = IntPtr.Size * 8;
                //versao_frame = Environment.Version.ToString();

                //ViewBag.Mensagem = "Sua hospedagem está configurada em: " + arq_bits + " bits" + "Sua hospedagem está configurada para utilizar o framework: " + versao_frame;

                Diretorios();
                TipoDal td = new TipoDal();
                ViewBag.Tipo = td.Listar();
                MarcaDal mdc = new MarcaDal();
                ViewBag.MarcaCarro = mdc.ListarByTipo("carro", true);
                MarcaDal mdm = new MarcaDal();
                ViewBag.MarcaMoto = mdm.ListarByTipo("moto", true);

                Random     rnd = new Random();
                VeiculoDal vd  = new VeiculoDal();
                IOrderedEnumerable <Veiculo> Items = vd.Listar(null, true).AsEnumerable().OrderBy((i => rnd.Next()));
                //List<Veiculo> Itens2 = new List<Veiculo>();
                //Itens2 = vd.Listar(null, true);
                ViewBag.Popular = Items.Where(x => x.Arquivo.Nome != "_semfoto.jpg").Where(x => x.Destaque == true).Take(4);

                //return View(banners);
                return(View());
            }
            catch (Exception)
            {
                throw;
            }
        }
        public ActionResult Index()
        {
            try
            {
                TipoDal td = new TipoDal();
                ViewBag.Tipo = td.Listar();
                MarcaDal mdc = new MarcaDal();
                ViewBag.MarcaCarro = mdc.ListarByTipo("carro", true, Constantes.IDEMPRESA);
                MarcaDal mdm = new MarcaDal();
                ViewBag.MarcaMoto = mdm.ListarByTipo("moto", true, Constantes.IDEMPRESA);
                Diretorios();

                Random     rnd = new Random();
                VeiculoDal vd  = new VeiculoDal();
                IOrderedEnumerable <Veiculo> Items = vd.Listar(null, true, Constantes.IDEMPRESA).AsEnumerable().OrderBy((i => rnd.Next()));
                ViewBag.Popular = Items.Where(x => x.Arquivo.Nome != "_semfoto.jpg").Where(x => x.Destaque == true).Take(4);
            }
            catch (Exception)
            {
                throw;
            }

            return(View());
        }
Beispiel #9
0
 public MarcaBiz()
 {
     this.marcaDal = FactoryDal <MarcaDal> .GetDal();
 }
Beispiel #10
0
 public MarcaBl()
 {
     _marcaDal = new MarcaDal();
 }
 public MarcaController()
 {
     marcaDal = new MarcaDal();
 }