コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["u"] != null && Request.QueryString["u"] == "GET")
     {
         XmlDocument oDoc = new XmlDocument();
         oDoc.Load(Request.InputStream);
         Mnemonic oMnemonic = new Mnemonic(0, dsn);
         DataSet  ds        = oMnemonic.GetPending(Server.UrlDecode(oDoc.FirstChild.InnerXml));
         Response.ContentType = "application/xml";
         Response.Write("<values>");
         foreach (DataRow dr in ds.Tables[0].Rows)
         {
             Response.Write("<value>" + dr["id"].ToString() + "</value><text><![CDATA[" + dr["factory_code"].ToString() + " - " + dr["name"].ToString() + "]]></text>");
         }
         Response.Write("</values>");
         Response.End();
     }
 }