public ActionResult Create(Vente_Details VenteDetailsToCreate)
        {
            if (!ModelState.IsValid)
                return View();

            try
            {
                VENTE_DETAILS _venteDetails = new VENTE_DETAILS();
                _venteDetails.ID_CHARGEMENT = VenteDetailsToCreate.ID_CHARGEMENT;
                _venteDetails.ID_VENTE = VenteDetailsToCreate.ID_VENTE;
                _venteDetails.PRIX_UNITAIRE = VenteDetailsToCreate.PRIX_UNITAIRE;
                _venteDetails.QTE = VenteDetailsToCreate.QTE;
                _venteDetails.TOTAL = VenteDetailsToCreate.TOTAL;
               
                _venteDetails.Save();
                return RedirectToAction("../VenteDetails/Index");
            }
            catch
            {
                return View();
            }
        }
        public ActionResult Edit(Vente_Details ventesDetails)
        {
            int id = Int32.Parse(RouteData.Values["id"].ToString());

            if (!ModelState.IsValid)
                return View();

            try
            {
                VENTE_DETAILS _venteDetails = new VENTE_DETAILS();
                _venteDetails.TOTAL = ventesDetails.TOTAL;
                _venteDetails.PRIX_UNITAIRE = ventesDetails.PRIX_UNITAIRE;
                _venteDetails.QTE = ventesDetails.QTE;
                _venteDetails.ID_VENTE = ventesDetails.ID_VENTE;
                _venteDetails.ID_CHARGEMENT = ventesDetails.ID_CHARGEMENT;
                _venteDetails.SetId(id);
                _venteDetails.Save();
                return RedirectToAction("../VenteDetails/Index");
            }
            catch
            {
                return View();
            }

        }