예제 #1
0
        public ActionResult CautaComanda()
        {
            var repo = new ReadRepository();

            comandaRepo = ReadRepository.IncarcaDinListaDeComenzi();
            var eventRepo             = ReadRepository.IncarcaDinListaDeEvenimente();
            List <ComandaMvc> comanda = new List <ComandaMvc>();

            foreach (Comanda c in comandaRepo)
            {
                // string idCom = c.iDComanda.ToString();

                /*  var mVC = new ComandaMvc(
                 *                        x.CIV.ToString(), x.Tip, x.Marca.ToString(), x.Model.ToString(), x.An.ToString(), x.Pret.ToString(), x.Kilometraj.ToString(),
                 *                        x.Descriere.ToString(), x.Motorizare.ToString(), x.Culoare.ToString(), x.Putere.ToString(),
                 *                        x.CapacitateCilindrica.ToString()
                 *                        ); */
                var mvc = new ComandaMvc(c.mecanic.nume, c.mecanic.idMecanic, c.client.nume, c.client.idClient,
                                         c.iDComanda, c.masina.Model, c.masina.anFabricatie, c.masina.civ, c.masina.serieSasiu,
                                         c.cerereClient);


                comanda.Add(mvc);
            }

            ViewBag.Model = comanda;
            return(View(comanda));
        }