protected void Page_Load(object sender, EventArgs e) { ///----------------------------------------------------- ///功 能: 查詢自評表答案 ///說 明: /// * Request["cpid"]: 業者Guid /// * Request["year"]: 年度 ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { //string cpid = (string.IsNullOrEmpty(Request["cpid"])) ? LogInfo.companyGuid : Request["cpid"].ToString().Trim(); string cpid = LogInfo.companyGuid; string year = (string.IsNullOrEmpty(Request["year"])) ? "" : Request["year"].ToString().Trim(); // for 3/23 //if (LogInfo.competence == "01") //{ // switch (LogInfo.mGuid) // { // case "64BF9515-47C0-47A6-BC30-88C6EFD50D03": // cpid = "A11B680E-4A42-45E0-BCE2-3B16679C0606"; // break; // case "B73B61B8-6CCF-4141-A858-9A8C4E403A9C": // cpid = "4B2E5C10-A9D5-4097-BBF7-161A3CCAC1E1"; // break; // case "39DF8B07-2F23-4D0E-8983-22AB7510DD3D": // cpid = "972153A3-98FE-40F8-9F4D-7C950BD3F51C"; // break; // case "5A2DE9FD-2A4D-4E0B-91D3-35951984571F": // cpid = "972153A3-98FE-40F8-9F4D-7C950BD3F51C"; // break; // case "FB0B69A5-4F28-4A6F-8EAC-3787D248E94A": // cpid = "972153A3-98FE-40F8-9F4D-7C950BD3F51C"; // break; // } //} //else if (LogInfo.competence == "03") //{ // cpid = "972153A3-98FE-40F8-9F4D-7C950BD3F51C"; //} db._業者guid = cpid; db._年度 = year; DataTable dt = db.GetCompanyAns(); string xmlstr = string.Empty; xmlstr = DataTableToXml.ConvertDatatableToXmlByAttribute(dt, "dataList", "data_item"); xmlstr = "<?xml version='1.0' encoding='utf-8'?><root>" + xmlstr + "</root>"; xDoc.LoadXml(xmlstr); } catch (Exception ex) { xDoc = ExceptionUtil.GetExceptionDocument(ex); } Response.ContentType = System.Net.Mime.MediaTypeNames.Text.Xml; xDoc.Save(Response.Output); }
protected void Page_Load(object sender, EventArgs e) { ///----------------------------------------------------- ///功 能: 查詢代碼檔 ///說 明: /// * Request["group"]: CodeTable Group 代碼 /// * Request["item"]: CodeTable Item 代碼 ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { string group = (string.IsNullOrEmpty(Request["group"])) ? "" : Request["group"].ToString().Trim(); string item = (string.IsNullOrEmpty(Request["item"])) ? "" : Request["item"].ToString().Trim(); string token = (string.IsNullOrEmpty(Request["Token"])) ? "" : Request["Token"].ToString().Trim(); if (Common.VeriftyToken(token)) { ct_db._C_Item = item; DataTable dt = ct_db.getCommonCode(group); string xmlstr = string.Empty; xmlstr = DataTableToXml.ConvertDatatableToXmlByAttribute(dt, "dataList", "data_item"); xmlstr = "<?xml version='1.0' encoding='utf-8'?><root>" + xmlstr + "</root>"; xDoc.LoadXml(xmlstr); } else { xDoc = ExceptionUtil.GetErrorMassageDocument("TokenFail"); } } catch (Exception ex) { xDoc = ExceptionUtil.GetExceptionDocument(ex); } Response.ContentType = System.Net.Mime.MediaTypeNames.Text.Xml; xDoc.Save(Response.Output); }
protected void Page_Load(object sender, EventArgs e) { ///----------------------------------------------------- ///功 能: 查詢 Top 3 最大版次 & 版次資訊 ///說明: ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { DataTable dt = cst_db.GetVersionDDL(); string xmlstr = string.Empty; xmlstr = DataTableToXml.ConvertDatatableToXmlByAttribute(dt, "dataList", "data_item"); xmlstr = "<?xml version='1.0' encoding='utf-8'?><root>" + xmlstr + "</root>"; xDoc.LoadXml(xmlstr); } catch (Exception ex) { xDoc = ExceptionUtil.GetExceptionDocument(ex); } Response.ContentType = System.Net.Mime.MediaTypeNames.Text.Xml; xDoc.Save(Response.Output); }