protected void Page_Load(object sender, EventArgs e) { ///----------------------------------------------------- ///功 能: 查詢代碼檔 ///說明: /// * Request["group"]: KeyTable Group 代碼(K_Code) ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { string group = (string.IsNullOrEmpty(Request["group"])) ? "" : Request["group"].ToString().Trim(); k_db._K_Code = group; DataTable dt = k_db.GetGlobal_DDL(); string xmlstr = string.Empty; xmlstr = DataTableToXml.ConvertDatatableToXML(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["cpid"]: 業者Guid ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { string cpid = (string.IsNullOrEmpty(Request["cpid"])) ? LogInfo.companyGuid : Request["cpid"].ToString().Trim(); db._guid = cpid; DataTable dt = db.GetInfo(); string xmlstr = string.Empty; xmlstr = DataTableToXml.ConvertDatatableToXML(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) { ///----------------------------------------------------- ///功 能: 查詢應用服務別(下拉選單列表) ///說 明: ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { string xmlstr = string.Empty; string token = (string.IsNullOrEmpty(Request["Token"])) ? "" : Request["Token"].ToString().Trim(); if (Common.VeriftyToken(token)) { DataTable dt = cst_db.getPlanType_ddl(); xmlstr = DataTableToXml.ConvertDatatableToXML(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) { ///----------------------------------------------------- ///功 能: 查詢天然氣自評表業者排除題目 ///說 明: /// * Request[""]: ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { if (LogInfo.competence == "01") { } else if (LogInfo.competence == "02") { db._年份 = "110"; db._業者guid = LogInfo.companyGuid; DataTable dt = db.GetList(); string xmlstr = string.Empty; xmlstr = DataTableToXml.ConvertDatatableToXML(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) { ///----------------------------------------------------- ///功 能: 撈市長副市長列表 ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { string MR_CityNo = (Request["CityNo"] != null) ? Request["CityNo"].ToString().Trim() : ""; string token = (string.IsNullOrEmpty(Request.Form["Token"])) ? "" : Request.Form["Token"].ToString().Trim(); if (Common.VeriftyToken(token)) { n_db._MR_CityNo = MR_CityNo; DataTable dt = n_db.getMayorList(); string xmlstr = string.Empty; xmlstr = DataTableToXml.ConvertDatatableToXML(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) { ///----------------------------------------------------- ///功 能: 取得天然氣自評表委員意見log列表 ///說 明: /// * Request["qid"]: 題目Guid ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { //string SearchStr = (string.IsNullOrEmpty(Request["SearchStr"])) ? "" : Request["SearchStr"].ToString().Trim(); string qid = (string.IsNullOrEmpty(Request["qid"])) ? "" : Request["qid"].ToString().Trim(); string xmlstr = string.Empty; DataTable dt = new DataTable(); gcs_db._題目guid = qid; gcs_db._業者guid = LogInfo.companyGuid; gcs_db._年度 = "110"; //db._KeyWord = SearchStr; dt = gcs_db.GetList(); xmlstr = DataTableToXml.ConvertDatatableToXML(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) { ///----------------------------------------------------- ///功 能: Custom Search Engine ///說 明: ///----------------------------------------------------- DataTable dt = new DataTable(); XmlDocument xDoc = new XmlDocument(); try { string City = (string.IsNullOrEmpty(Request["City"])) ? "" : Request["City"].ToString().Trim(); string Type = (string.IsNullOrEmpty(Request["Type"])) ? "" : Request["Type"].ToString().Trim(); string Keyword = (string.IsNullOrEmpty(Request["Keyword"])) ? "" : Request["Keyword"].ToString().Trim(); string xmlstr = string.Empty; k_db._KeyWord = Keyword; k_db._K_Code = Type; dt = k_db.GetGlobalList(); xmlstr = DataTableToXml.ConvertDatatableToXML(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["SearchComp"]: 所屬單位/權限 /// * Request["SearchStr"]: 關鍵字 /// * Request["PageNo"]: 所在頁面 /// * Request["PageSize"]: 一頁幾筆資料 /// * Request["SortName"]: 排序欄位名稱 /// * Request["SortMethod"]: 排序方式 ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { string SearchComp = (Request["SearchComp"] != null) ? Request["SearchComp"].ToString().Trim() : ""; string SearchStr = (Request["SearchStr"] != null) ? Request["SearchStr"].ToString().Trim() : ""; string PageNo = (Request["PageNo"] != null) ? Request["PageNo"].ToString().Trim() : ""; int PageSize = (Request["PageSize"] != null) ? int.Parse(Request["PageSize"].ToString().Trim()) : 10; string SortName = (Request["SortName"] != null) ? Request["SortName"].ToString().Trim() : ""; string SortMethod = (Request["SortMethod"] != null) ? Request["SortMethod"].ToString().Trim() : "-"; SortMethod = (SortMethod == "+") ? "asc" : "desc"; string SortCommand = SortName + " " + SortMethod; string token = (string.IsNullOrEmpty(Request["Token"])) ? "" : Request["Token"].ToString().Trim(); if (Common.VeriftyToken(token)) { //計算起始與結束 int pageEnd = (int.Parse(PageNo) + 1) * PageSize; int pageStart = pageEnd - PageSize + 1; string xmlstr = string.Empty; string xmlstr2 = string.Empty; m_db._KeyWord = SearchStr; DataSet ds = m_db.getMemberList(pageStart.ToString(), pageEnd.ToString(), SortCommand, SearchComp); xmlstr = "<total>" + ds.Tables[0].Rows[0]["total"].ToString() + "</total>"; xmlstr2 = DataTableToXml.ConvertDatatableToXML(ds.Tables[1], "dataList", "data_item"); xmlstr = "<?xml version='1.0' encoding='utf-8'?><root>" + xmlstr + xmlstr2 + "</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) { ///----------------------------------------------------- ///功 能: 查詢石油業者清單 ///說 明: /// * Request[""]: ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { //string SearchStr = (string.IsNullOrEmpty(Request["SearchStr"])) ? "" : Request["SearchStr"].ToString().Trim(); string type = (string.IsNullOrEmpty(Request["type"])) ? "" : Request["type"].ToString().Trim(); string cpid = (string.IsNullOrEmpty(Request["cpid"])) ? "" : Request["cpid"].ToString().Trim(); string xmlstr = string.Empty; string Competence = LogInfo.competence; DataTable dt = new DataTable(); //db._KeyWord = SearchStr; if (type == "list") { if (Competence != "01") { dt = db.GetCompanyList(); } else { mc_db._委員guid = LogInfo.mGuid; mc_db._年度 = "110"; dt = mc_db.GetMasterList(); } xmlstr = DataTableToXml.ConvertDatatableToXML(dt, "dataList", "data_item"); xmlstr = "<?xml version='1.0' encoding='utf-8'?><root>" + xmlstr + "</root>"; xDoc.LoadXml(xmlstr); } else { db._guid = cpid; dt = db.GetCompany(); xmlstr = "<?xml version='1.0' encoding='utf-8'?><root><guid>" + dt.Rows[0]["guid"].ToString() + "</guid></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) { ///----------------------------------------------------- ///功 能: 撈觀光列表 ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { string T_CityNo = (Request["CityNo"] != null) ? Request["CityNo"].ToString().Trim() : ""; string SortName = (Request["SortName"] != null) ? Request["SortName"].ToString().Trim() : ""; string SortMethod = (Request["SortMethod"] != null) ? Request["SortMethod"].ToString().Trim() : "-"; string token = (string.IsNullOrEmpty(Request["Token"])) ? "" : Request["Token"].ToString().Trim(); SortMethod = (SortMethod == "+") ? "asc" : "desc"; DataTable dt = new DataTable(); if (Common.VeriftyToken(token)) { n_db._T_CityNo = T_CityNo; if (T_CityNo != "All") { dt = n_db.getTravelList(); } else { dt = n_db.getTravel_All(SortName, SortMethod); } string xmlstr = string.Empty; xmlstr = DataTableToXml.ConvertDatatableToXML(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) { ///----------------------------------------------------- ///功 能: 查詢會員Log ///說 明: /// * Request["PageNo"]: 所在頁面 /// * Request["PageSize"]: 一頁幾筆資料 /// * Request["SortName"]: 排序欄位名稱 /// * Request["SortMethod"]: 排序方式 ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { string PageNo = (Request["PageNo"] != null) ? Request["PageNo"].ToString().Trim() : ""; int PageSize = (Request["PageSize"] != null) ? int.Parse(Request["PageSize"].ToString().Trim()) : 10; string SortName = (Request["SortName"] != null) ? Request["SortName"].ToString().Trim() : ""; string SortMethod = (Request["SortMethod"] != null) ? Request["SortMethod"].ToString().Trim() : "-"; SortMethod = (SortMethod == "+") ? "asc" : "desc"; string SortCommand = SortName + " " + SortMethod; //計算起始與結束 int pageEnd = (int.Parse(PageNo) + 1) * PageSize; int pageStart = pageEnd - PageSize + 1; string xmlstr = string.Empty; string xmlstr2 = string.Empty; idl_db._IDL_Type = "IDB"; DataSet ds = idl_db.getList(pageStart.ToString(), pageEnd.ToString(), SortCommand); xmlstr = "<total>" + ds.Tables[0].Rows[0]["total"].ToString() + "</total>"; xmlstr2 = DataTableToXml.ConvertDatatableToXML(ds.Tables[1], "dataList", "data_item"); xmlstr = "<?xml version='1.0' encoding='utf-8'?><root>" + xmlstr + xmlstr2 + "</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["Area"]: 含 / 不含全區 /// * Request["City"]: 縣市代碼 /// * Request["ServiceType"]: 領域別 /// * Request["PlanName"]: 計畫名稱 /// * Request["CompanyName"]: 公司名稱 /// * Request["JoinCompanyName"]: 聯合公司名稱 /// * Request["SortName"]: 排序欄位名稱 /// * Request["SortMethod"]: 排序方式 ///----------------------------------------------------- XmlDocument xDoc = new XmlDocument(); try { string Area = (string.IsNullOrEmpty(Request["Area"])) ? "" : Request["Area"].ToString().Trim(); string City = (string.IsNullOrEmpty(Request["City"])) ? "" : Request["City"].ToString().Trim(); string ServiceType = (string.IsNullOrEmpty(Request["ServiceType"])) ? "" : Request["ServiceType"].ToString().Trim(); string PlanName = (string.IsNullOrEmpty(Request["PlanName"])) ? "" : Request["PlanName"].ToString().Trim(); string CompanyName = (string.IsNullOrEmpty(Request["CompanyName"])) ? "" : Request["CompanyName"].ToString().Trim(); string SortName = (Request["SortName"] != null) ? Request["SortName"].ToString().Trim() : ""; string SortMethod = (Request["SortMethod"] != null) ? Request["SortMethod"].ToString().Trim() : "-"; SortMethod = (SortMethod == "+") ? "asc" : "desc"; string SortCommand = string.Empty; if (City != "") { SortCommand = (SortName != "") ? SortName + " " + SortMethod : "CONVERT(int,CP_No)"; } else { SortCommand = (SortName != "") ? SortName + " " + SortMethod : "CONVERT(int,CS_No)"; } string token = (string.IsNullOrEmpty(Request["Token"])) ? "" : Request["Token"].ToString().Trim(); if (Common.VeriftyToken(token)) { string xmlstr = string.Empty; string xmlstr2 = string.Empty; if (Area == "N") { cst_db._CS_AllArea = Area; } cst_db._CS_HostCompany = CompanyName; cst_db._CS_JointCompany = CompanyName; cst_db._CS_PlanName = PlanName; cst_db._CS_ServiceType = ServiceType; DataSet ds = cst_db.GetList(City, SortCommand); xmlstr = DataTableToXml.ConvertDatatableToXML(ds.Tables[0], "dataList", "sum_item"); xmlstr2 = DataTableToXml.ConvertDatatableToXML(ds.Tables[1], "dataList", "data_item"); xmlstr = "<?xml version='1.0' encoding='utf-8'?><root>" + xmlstr + xmlstr2 + "</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); }