public ActionResult Edit(int id, FormCollection collection)
        {
            try
            {
                FacturaModels facturaVeche = facturaRepository.GetFacturaById(id);
                FacturaModels facturaNoua  = new FacturaModels();
                UpdateModel(facturaNoua);
                facturaNoua.IdFactura  = facturaVeche.IdFactura;
                facturaNoua.IdCos      = facturaVeche.IdCos;
                facturaNoua.IdClient   = facturaVeche.IdClient;
                facturaNoua.Data       = facturaVeche.Data;
                facturaNoua.TotalPlata = facturaVeche.TotalPlata;

                facturaRepository.UpdateFactura(facturaNoua);



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