//}
        /// <summary>
        //        /*=============================================================================================
        //        '程式說明:扣玩家Gash點數
        //        '傳入參數:	MainAccountID : GASH_ID
        //        '		Memo:內容("橘子柑仔店競標")
        //        '		ServiceCode : 服務代碼(如:"999995")
        //        '		ServiceRegion : 服務區域代碼 (如:"T0")
        //        '		Time : 消費時間
        //        '		Point : 此次消費點數
        //        '		Memo : 附註
        //        '		IPAddress : IP位址
        //        '傳回結果:	"0":失敗
        //        '		"1":成功
        //        =============================================================================================*/
        public static string Deduct_GASHPoint_ServiceAccount(string tmpGash, string tempService, string tmpRegion, string str_Region, int ExpectPont, string tmpMemo, string tmpIP)
        {
            try
            {
                AAA Gash_WS = new AAA();
                switch (str_Region.ToUpper())
                {
                    case "TW":
                        Gash_WS.Url = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["GASHv30FWS_AAA"] ?? "");
                        break;
                    case "HK":
                        Gash_WS.Url = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["GASHv30FWS_AAA_HK"] ?? "");
                        break;
                    default:
                        Gash_WS.Url = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["GASHv30FWS_AAA"] ?? "");
                        break;
                }

                if (tmpGash.Length <= 0 || ExpectPont <= 0)
                { return "0;點數錯誤(111)"; }
                else
                {
                    string nowDate = DateTime.Now.ToString("yyyy/MM/dd") + " " + DateTime.Now.Hour.ToString() + DateTime.Now.ToString(":mm:ss");    //避免上下午混用,轉成24H制
                    string myresult = Gash_WS.ServiceAccount_AccountingFreePoint(tempService, tmpRegion, tmpGash, nowDate, ExpectPont, tmpMemo, tmpIP);
                    if (myresult.Length > 0)
                    {
                        if (myresult.Substring(0, 1) == "1")
                        { return "1"; }
                        else
                        { return myresult; }
                    }
                    else
                    {
                        return "0;扣點回傳錯誤(沒有回傳值)(111)";
                    }
                }

            }
            catch
            {
                return "0;扣點發生不明錯誤(111)";
            }
        }
        /// <summary>
        /// 服務帳號自由點數扣點;
        /// </summary>
        /// <param name="GashAccount"></param>
        /// <param name="GashRegion"></param>
        /// <returns>"1":成功; 	"0":失敗</returns>
        public string Deduct_GASHPoint_ServiceAccount(string ServiceAccount, string ServiceCode, string ServiceRegion, string GashRegion, int ExpectPont, string Memo, string IP)
        {
            string Result = "0";
            string wsResult = string.Empty;
            string[] aryResult;
            string nowDate = DateTime.Now.ToString("yyyy/MM/dd") + " " + DateTime.Now.Hour.ToString() + DateTime.Now.ToString(":mm:ss");    //避免上下午混用,轉成24H制

            using (AAA ws = new AAA())
            {
                ws.Url = GetGashWSUrl("AAA", GashRegion.ToUpper());
                try
                {
                    //WS return: intResult;Outstring
                    //intResult: (1  Success, 0  Failed, -1  Error)
                    wsResult = ws.ServiceAccount_AccountingFreePoint(ServiceCode, ServiceRegion,ServiceAccount, nowDate, ExpectPont, Memo, IP);
                    aryResult = wsResult.Split(";".ToCharArray());
                    Result = (aryResult[0] == "1") ? "1" : "0";
                    OutputResult = aryResult[0];
                }
                catch (Exception ex)
                {
                    Result = "0";
                    WSException = ex;
                    aryResult = new string[] { "" };
                }
            }

            OutputMsg = (aryResult != null && aryResult.Length > 1) ? aryResult[1] : wsResult;

            return Result;
        }