示例#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"));
        }