using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Text; using System.Data.SqlClient; using System.Collections.Generic; using System.Xml; using DSWeb.Models; using DSWeb.EntityDA; namespace DSWeb.FeeCodes { public partial class OPERATORCODEAdapter : System.Web.UI.Page { private string strSHOWNAME = ""; private string strCUSTOMERNAME = ""; private string strPortName = ""; public string rName = ""; protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["CUSTOMERNAME"] != null) { UnicodeEncoding unicode = new UnicodeEncoding(); strCUSTOMERNAME = unicode.GetString(unicode.GetBytes(Request.QueryString["CUSTOMERNAME"].ToString())); } if (Request.QueryString["SHOWNAME"] != null) { UnicodeEncoding unicode = new UnicodeEncoding(); strSHOWNAME = unicode.GetString(unicode.GetBytes(Request.QueryString["SHOWNAME"].ToString())); } if (Request.QueryString["rName"] != null) { rName = Request.QueryString["rName"].ToString(); } // if (strSHOWNAME != "" && rName != "") { T_ALL_DA T_ALL_DA = new T_ALL_DA(); DataSet ds = T_ALL_DA.GetAllSQL("select * from info_client_contact where ISDELETED=0 and SHOWNAME='" + strSHOWNAME + "' and " + rName + "=1"); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { strPortName = ds.Tables[0].Rows[0]["TEL"].ToString().Trim() + "&&" + ds.Tables[0].Rows[0]["FAX"].ToString().Trim() + "&&" + ds.Tables[0].Rows[0]["EMAIL"].ToString().Trim(); } } } else if (strSHOWNAME != "" && rName == "" && strCUSTOMERNAME != "") { T_ALL_DA T_ALL_DA = new T_ALL_DA(); DataSet ds = T_ALL_DA.GetAllSQL("select * from info_client_contact where ISDELETED=0 and SHOWNAME='" + strSHOWNAME + "' and LINKID in(select GID from info_client where SHORTNAME='" + strCUSTOMERNAME + "' and ISSTOP=0)"); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { strPortName = ds.Tables[0].Rows[0]["TEL"].ToString().Trim() + "," + ds.Tables[0].Rows[0]["FAX"].ToString().Trim() + "," + ds.Tables[0].Rows[0]["EMAIL"].ToString().Trim(); } } } Response.Write(strPortName); } } }