private void ClientGiftPurchase(int iGiftPrice)
    {
        ClientInfoBusiness ClientRemainPoints = new ClientInfoBusiness();
        ClientInfoEntity   ClientInfo         = new ClientInfoEntity();

        ClientInfo = ClientRemainPoints.GetClientInfoByID(long.Parse(Session["UsersID"].ToString()));

        if ((long)iGiftPrice - (long)ClientInfo.lclientPoints < 0)
        {
            GiftTradeBusiness GiftTrade = new GiftTradeBusiness();
            GiftTrade.ClientGiftPurchase(long.Parse(Request.QueryString["GiftID"].ToString()), long.Parse(Session["UsersID"].ToString()));
            int iReturnValue = ClientRemainPoints.ClientGiftPurchaseByPoints(iGiftPrice, long.Parse(Session["UsersID"].ToString()));
            if (iReturnValue > 0)
            {
                Response.Write("<script>alert('感谢您的兑换!')</script>");
            }
            else
            {
                Response.Write("<script>alert('程序出错,兑换失败!')</script>");
            }
        }
        else
        {
            Response.Write("<script>alert('您的剩余积分不足!')</script>");
        }
    }