示例#1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            string str  = base.Request.Form["xmlname"];
            string s    = base.Request.Form["xmldata"];
            string str2 = base.Request.Form["expressname"];

            if (!string.IsNullOrEmpty(str) && !string.IsNullOrEmpty(str2) && SalesHelper.AddExpressTemplate(str2, str + ".xml"))
            {
                System.IO.FileStream stream = new System.IO.FileStream(System.Web.HttpContext.Current.Request.MapPath(Globals.ApplicationPath + string.Format("/Storage/master/flex/{0}.xml", str)), System.IO.FileMode.Create);
                byte[] bytes = new System.Text.UTF8Encoding().GetBytes(s);
                stream.Write(bytes, 0, bytes.Length);
                stream.Flush();
                stream.Close();
            }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string text  = base.Request.Form["xmlname"];
            string s     = base.Request.Form["xmldata"];
            string text2 = base.Request.Form["expressname"];

            if (!string.IsNullOrEmpty(text) && !string.IsNullOrEmpty(text2) && SalesHelper.AddExpressTemplate(text2, text + ".xml"))
            {
                string     path       = HttpContext.Current.Request.MapPath($"/Storage/master/flex/{text}.xml");
                FileStream fileStream = new FileStream(path, FileMode.Create);
                byte[]     bytes      = new UTF8Encoding().GetBytes(s);
                fileStream.Write(bytes, 0, bytes.Length);
                fileStream.Flush();
                fileStream.Close();
            }
        }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string xmlname     = Request.Form["xmlname"];
            string xmldata     = Request.Form["xmldata"];
            string expressname = Request.Form["expressname"];

            if ((!string.IsNullOrEmpty(xmlname) && !string.IsNullOrEmpty(expressname)) && SalesHelper.AddExpressTemplate(expressname, xmlname + ".xml"))
            {
                FileStream stream = new FileStream(HttpContext.Current.Request.MapPath(Globals.ApplicationPath + string.Format("/Storage/master/flex/{0}.xml", xmlname)), FileMode.Create);
                byte[]     bytes  = new UTF8Encoding().GetBytes(xmldata);
                stream.Write(bytes, 0, bytes.Length);
                stream.Flush();
                stream.Close();
            }
        }