Exemplo n.º 1
0
        public ActionResult SignOperation(string id)
        {
            var    repository  = new SafetyAssessmentRepository();
            var    model       = repository.GetPreamble(new Guid(id));
            bool   IsSuccess   = true;
            string preambleXml = string.Empty;

            try
            {
                preambleXml = SerializeHelper.SerializeDataContract(model);
                preambleXml = preambleXml.Replace("utf-16", "utf-8");
            }
            catch (Exception)
            {
                IsSuccess = false;
            }

            return(Json(new
            {
                IsSuccess,
                preambleXml
            }, JsonRequestBehavior.AllowGet));
        }