Beispiel #1
0
        public static string GiftToGame(int iUserID, string sGameAbbre, string sAccount, int iPoint, string sTranIP, string sChannelAbbre)
        {
            int iChannelID = ChannelBLL.ChannelIDSelByAbbre(sChannelAbbre);

            if (iChannelID < 20)
            {
                return("-3");
            }
            string sGiftPointRes = TransPBLL.FirstGiftSend(iUserID, iPoint, sTranIP, iChannelID);
            string sRes          = string.Empty;

            if (sGiftPointRes == "0")
            {
                string sGiftGameRes = PayAll.GamePay(sGameAbbre, iUserID, sAccount, iPoint, "", iUserID);
                if (sGiftGameRes.Split('|')[0] == "0")
                {
                    sRes = "0";
                }
                else
                {
                    UserPointsBLL.UGiftPointUpdate(iUserID, 0);
                    sRes = string.Format(string.Format("-2|{0}", sGiftGameRes));
                }
            }
            else
            {
                sRes = string.Format("-1|{0}", sGiftPointRes);
            }
            return(sRes);
        }
Beispiel #2
0
        public static string GiftToGame(int iUserID, string sGameAbbre, string sAccount, int iPoint, string sTranIP)
        {
            string sRes          = string.Empty;
            string sGiftPointRes = TransPBLL.GiftPointsSend(iUserID, iPoint, sTranIP);

            if (sGiftPointRes == "0")
            {
                string sGiftGameRes = PayAll.GamePay(sGameAbbre, iUserID, sAccount, iPoint, "", iUserID);
                if (sGiftGameRes.Split('|')[0] == "0")
                {
                    sRes = "0";
                }
                else
                {
                    UserPointsBLL.UGiftPointUpdate(iUserID, 0);
                    sRes = string.Format(string.Format("-2|{0}", sGiftGameRes));
                }
            }
            else
            {
                sRes = string.Format("-1|{0}", sGiftPointRes);
            }
            return(sRes);
        }