示例#1
0
        public static string wssgPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            decimal dMoney  = Convert.ToDecimal(iPayPoints / 10);
            string  sTranIP = ProvideCommon.GetRealIP();
            string  sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string  sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes    = Pay(iGUserID.ToString(), dMoney, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
            case "2":
                int iServerID = int.Parse(GetServerID(sGameAbbre));
                GamePaySucBLL.GamePaySucAdd(iUserID, iGUserID, iPayPoints, sTranID, "wssg", iServerID);
                sReturn = string.Format("0|{0}", sTranID);
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
示例#2
0
        public static string wssgQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int    iUserID = UserBll.UserIDSel(sUserName);
            string sRes    = Pay(iUserID.ToString(), dPrice, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
                int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                if (iGRes == 0)
                {
                    sReturn = "0";
                }
                else
                {
                    sReturn = "-1";
                }
                int iPoint    = Convert.ToInt32(dPrice) * 10;
                int iServerID = int.Parse(GetServerID(sGameAbbre));
                GamePaySucBLL.GamePaySucAdd(iUserID, iUserID, iPoint, sTranID, "wssg", iServerID);
                break;

            case "2":
                sReturn = "0";
                TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
示例#3
0
        public static int UserDWCJNum(int iUserID)
        {
            int      iNum    = 0;
            DateTime dtBegin = new DateTime(2013, 6, 9);
            DateTime dtEnd   = new DateTime(2013, 6, 17);
            int      iPoint  = GamePaySucBLL.UPointSelByGNTime("wssg", iUserID, dtBegin, dtEnd);

            if (iPoint > 999)
            {
                int iPayNum   = iPoint / 1000;
                int iPayedNum = GameGiftBLL.UCountSelByGift(iUserID, "wssg2013dw");
                iNum = iPayNum - iPayedNum;
            }
            return(iNum);
        }