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.
DS7HYRD/DSWeb/FeeCodes/CLIENTCURRENCYIDAdapter.asp...

88 lines
3.1 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 CLIENTCURRENCYIDAdapter : System.Web.UI.Page
{
private string strSHORTNAME = "";
private string strCURRENCY = "";
private string strPortName = "";
T_ALL_DA T_ALL_DA = new T_ALL_DA();
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["CUSTOMERNAME"] != null)
{
UnicodeEncoding unicode = new UnicodeEncoding();
strSHORTNAME = unicode.GetString(unicode.GetBytes(Request.QueryString["CUSTOMERNAME"].ToString()));
}
if (Request.QueryString["CURRENCY"] != null)
{
strCURRENCY = Request.QueryString["CURRENCY"].ToString();
getCURRENCY();
return;
}
if (Request.QueryString["SALE"] != null)
{
getSALE();
return;
}
}
protected void getCURRENCY()
{
if (strSHORTNAME != "" && strSHORTNAME != "null")
{
DataSet ds = T_ALL_DA.GetAllSQL("select * from info_client where SHORTNAME='" + strSHORTNAME + "' and ISSTOP=0");
if (ds != null)
{
if (ds.Tables[0].Rows.Count > 0)
{
if (strCURRENCY.Trim() == "USD")
{
strPortName = ds.Tables[0].Rows[0]["USDBillRises"].ToString().Trim() + "&&" + ds.Tables[0].Rows[0]["USDBank"].ToString().Trim() + "&&" + ds.Tables[0].Rows[0]["USDAccount"].ToString().Trim() + "&&" + ds.Tables[0].Rows[0]["ADDR"].ToString().Trim();
}
else if (strCURRENCY.Trim() == "RMB")
{
strPortName = ds.Tables[0].Rows[0]["RMBBillRises"].ToString().Trim() + "&&" + ds.Tables[0].Rows[0]["RMBBank"].ToString().Trim() + "&&" + ds.Tables[0].Rows[0]["RMBAccount"].ToString().Trim() + "&&" + ds.Tables[0].Rows[0]["ADDR"].ToString().Trim();
}
else
{
strPortName = "";
}
}
}
}
Response.Write(strPortName);
}
protected void getSALE()
{
if (strSHORTNAME != "" && strSHORTNAME != "null")
{
strPortName = "";
strPortName = T_ALL_DA.GetStrSQL("SALE", "select SALE from info_client where SHORTNAME='" + strSHORTNAME + "' and ISSTOP=0");
}
Response.Write(strPortName);
}
}
}