using System.Collections.Generic;
public static void Main()
string sServiceCurrency = "1,2";
string sSuerySataement = "";
List<string> listSQL = new List<string>();
if (sServiceCurrency != null && sServiceCurrency.Length > 0)
if (sServiceCurrency != "1,2,3,4"){
if (sServiceCurrency.IndexOf("1") >= 0){
listSQL.Add("(ATM_WITHDRAW_CNY=1)");
if (sServiceCurrency.IndexOf("2") >= 0){
listSQL.Add("(ATM_WITHDRAW_USD=1)");
if (sServiceCurrency.IndexOf("3") >= 0){
listSQL.Add("(ATM_WITHDRAW_JPY=1)");
if (sServiceCurrency.IndexOf("4") >= 0){
listSQL.Add("(ATM_WITHDRAW_HKD=1)");
sSuerySataement = " ATM_WITHDRAW=1 and (" + string.Join(" or ", listSQL) + ") and ";
sSuerySataement = " ATM_WITHDRAW=1 ";
Console.WriteLine(sSuerySataement);