Esempio n. 1
0
        public ActionResult Post([FromBody] XmlSet xmlset)
        {
            string loginguid = string.Empty;

            HttpContext.Request.Cookies.TryGetValue("loginguid", out loginguid);
            xmlset.loginguid = loginguid;
            var result = PDMUtils.setAction(xmlset);

            return(Json(result));
        }
Esempio n. 2
0
        public ActionResult Post([FromBody] JToken token)
        {
            string jsonStr   = JsonConvert.SerializeObject(token);
            string loginguid = string.Empty;

            HttpContext.Request.Cookies.TryGetValue("loginguid", out loginguid);
            XmlDocument doc           = JsonConvert.DeserializeXmlNode(jsonStr, "SET");
            XmlElement  root          = doc.DocumentElement;
            XmlElement  elemLoginguid = doc.CreateElement("LOGINGUID");

            elemLoginguid.InnerText = loginguid;
            root.AppendChild(elemLoginguid);
            var result = PDMUtils.setAction(doc);

            return(Json(result));
        }