public ActionResult AdaugaProdus(ProdusMVC mVC)
        {
            var comandaAdaugaProdus = new ComandaAdaugaProdus();

            Produs p = new Produs(new PlainText(mVC.CodBare.ToString()), new PlainText(mVC.Denumire.ToString()), new PlainText(mVC.Marca.ToString()), mVC.Tip, new PlainText(mVC.Stoc.ToString()),
                                  new PlainText(mVC.Pret.ToString()), new PlainText(mVC.Descriere.ToString()), new PlainText(mVC.Garantie.ToString()), new PlainText(mVC.Furnizor.ToString()), mVC.Stare);

            comandaAdaugaProdus.Produs1 = p;
            MagistralaComenzi.Instanta.Value.Trimite(comandaAdaugaProdus);
            var r     = new Receive();  //////rabbit receive
            var mesaj = r.PrimesteEveiment();

            return(View("MainPage"));
        }
        public ActionResult CautaProdus(ProdusMVC mVC)
        {
            ProdusMVC mVC2 = null;
            var       repo = new ReadRepository();

            produsRepo = repo.IncarcaListaDeEvenimente();
            List <ProdusMVC> produs = new List <ProdusMVC>();

            foreach (Produs i in produsRepo)
            {
                if (i.CodBare.ToString().Equals(mVC.CodBare)) //(i.Denumire.ToString().Equals(mVC.Denumire))  //(i.CodBare.ToString().Equals(mVC.CodBare))
                {
                    mVC2 = new ProdusMVC(i.CodBare.ToString(), i.Denumire.ToString(), i.Marca.ToString(), i.Tip, i.Stoc.ToString(), i.Pret.ToString(),
                                         i.Descriere.ToString(), i.Garantie.ToString(), i.Furnizor.ToString(), i.Stare);

                    produs.Add(mVC2);
                }
            }

            ViewBag.Model = produs;
            return(View("AfisareProduse", produs));
        }