You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
D7QUANTAI/DSWeb/FeeCodes/OPERATORCODEAdapter.aspx.cs

73 lines
2.9 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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);
}
}
}