目的: V20305O - 撥發單位查詢 -挑選件號 SQL - SP_NSN@TLS_245
處理說明:1>設定 DBLINK = TLSEU
若為測試區,則會自動加 '5'
若為測試區,則會自動加 '5'
2>當成一般 Table 處理 SP_NSN
3>其他 挑選欄位時,DBLINK會自動還原 成預設值(AMMEU5)
4>SQL 修改如下, - 設定 DBLINK
string Tmp_Sql = " SELECT DISTINCT PN "+ " FROM SP_NSN "
+ " ORDER BY PN ";
string n = funId + "_sub_PN";
DBLINK = "TLSEU";
DataSet ds = setupPickDs(n, Tmp_Sql, new string[] { "SP_NSN" });
1>*.cs
[HttpPost]
public dynamic get_sub_PNPick(string PN = "", int isComplete = 0)
{
//列出所有申請單(PN)
string Tmp_Sql = "
SELECT DISTINCT PN
"
+ " FROM SP_NSN@TLS_245 "
+ " WHERE 1=1 "
+ " ORDER BY PN ";
DataSet ds = setupPickDs(n, Tmp_Sql, new string[] { "SP_NSN@TLS_245" });
public dynamic get_sub_PNPick(string PN = "", int isComplete = 0)
{
//列出所有申請單(PN)
+ " FROM SP_NSN@TLS_245 "
+ " ORDER BY PN ";
DataSet ds = setupPickDs(n, Tmp_Sql, new string[] { "SP_NSN@TLS_245" });
//--> 會出現錯誤訊息 , 修改如下藍字,即可 - DBLINK='TLSEU'
string Tmp_Sql = "
SELECT DISTINCT PN "
+ " FROM SP_NSN "
+ " WHERE 1=1 "
+ " ORDER BY PN ";
string n = funId + "_sub_PN";
DBLINK = "TLSEU";
DataSet ds = setupPickDs(n, Tmp_Sql, new string[] { "SP_NSN" });
if (PN != null && !PN.Equals(""))
{
if (isComplete == 1)
{
ds = getPickDsbyCondi(n, "PN='" + PN + "'");
}
else
{
ds = getPickDsbyCondi(n, "PN LIKE '%" + PN + "%'");
}
}
return ds;
} // end of get_V20305P_PNPick
+ " FROM SP_NSN "
+ " ORDER BY PN ";
string n = funId + "_sub_PN";
DBLINK = "TLSEU";
{
if (isComplete == 1)
{ds = getPickDsbyCondi(n, "PN='" + PN + "'");
}
else
{
ds = getPickDsbyCondi(n, "PN LIKE '%" + PN + "%'");
}
}
return ds;
} // end of get_V20305P_PNPick


