Ejemplo n.º 1
0
        public string JsonCommandeModif()
        {
            JavaScriptSerializer ser = new JavaScriptSerializer();

            var jsonData = new CommandeInterneDto()
            {
                id           = Convert.ToInt64(idCommandeFournisseur),
                prixTotal    = Convert.ToInt32(prixTotalCommande),
                dateCommande = dateCommandeEdit,
                status       = statusCommande,
                isActive     = true
            };

            var result = ser.Serialize(jsonData);

            return(result);
        }
Ejemplo n.º 2
0
        public string JsonTCommandeInterne()
        {
            JavaScriptSerializer ser = new JavaScriptSerializer();

            DateTime myDateTime       = DateTime.Now;
            string   sqlFormattedDate = myDateTime.ToString("yyyy-MM-ddTHH:mm:ss.fff");

            var jsonData = new CommandeInterneDto()
            {
                id           = 0,
                prixTotal    = prixtotaux,
                dateCommande = sqlFormattedDate,
                isActive     = true,
                status       = "En cours",
            };

            var result = ser.Serialize(jsonData);

            return(result);
        }