Beispiel #1
0
        public ActionResult Save([Bind(Prefix = "Item1")] Commande commande)
        {
            if (commande.Idclt == 0)
            {
                commande.Idclt = Convert.ToInt32(Session["user"]);
            }
            if (commande.Id != 0)
            {
                commande.Update();
            }
            else
            {
                commande.Add();
            }

            return(RedirectToAction("Index"));
        }
        private void Ligne_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            _Commande.Update();
            if (e.PropertyName == "Qte")
            {
                SaveLigne(sender as LigneCommande);
            }

            if (e.PropertyName == "Stock")
            {
                var ligne = (LigneCommande)sender;
                logistiqueRepos.DeclareStock(
                    ligne.Stock,
                    new Logistique.Model.Article()
                {
                    ArRef = ligne.ArRef
                }
                    );
            }
        }