public ActionResult Create(FormCollection collection)
        {
            try
            {
                FacturaModels facturaModels = new FacturaModels();
                UpdateModel(facturaModels);
                facturaModels.IdFactura = cosCumparaturiRepository.Ultimacomanda(clientRepository.GetClientByEmail(User.Identity.Name));
                facturaModels.IdCos     = cosCumparaturiRepository.IdCos();
                facturaModels.IdClient  = clientRepository.GetClientByEmail(User.Identity.Name);
                facturaModels.Data      = DateTime.UtcNow;
                var totalPlata = cosCumparaturiRepository.TotalPlata(clientRepository.GetClientByEmail(User.Identity.Name));
                totalPlata = totalPlata + totalPlata * (decimal)0.19;
                facturaModels.TotalPlata = totalPlata;

                facturaRepository.InserareFactura(facturaModels);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View("CreateFactura"));
            }
        }