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.

82 lines
2.6 KiB
C#

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 YARDAddressAdapter : System.Web.UI.Page
{
private string strIS = "";
private string strCODENAME = "";
private string strF = "";
private string strPortName = "";
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["strIS"] != null)
{
strIS = Request.QueryString["strIS"].ToString();
}
if (Request.QueryString["CODENAME"] != null)
{
strCODENAME = Request.QueryString["CODENAME"].ToString();
}
if (Request.QueryString["strF"] != null)
{
strF = Request.QueryString["strF"].ToString();
}
if (strIS != "" && strCODENAME != "")
{
T_ALL_DA T_ALL_DA = new T_ALL_DA();
DataSet ds = T_ALL_DA.GetWebCrmClientCODENAME(strIS, strCODENAME);
if (strF.Trim().Equals("ADDR"))
{
if (ds != null)
{
strPortName = ds.Tables[0].Rows[0]["ADDR"].ToString().Trim();
}
Response.Write(strPortName);
return;
}
else if (strF.Trim().Equals("CHIEF"))
{
if (ds != null)
{
strPortName = ds.Tables[0].Rows[0]["CHIEF"].ToString().Trim();
}
Response.Write(strPortName);
return;
}
else if (strF.Trim().Equals("TEL"))
{
if (ds != null)
{
strPortName = ds.Tables[0].Rows[0]["TEL"].ToString().Trim();
if (strPortName.Equals("86-0-0") || strPortName.Equals("86--") || strPortName.Equals("86"))
{
strPortName = "";
}
}
Response.Write(strPortName);
return;
}
}
}
}
}