Beispiel #1
0
    private static void HandlePoints(Member User)
    {
        Money  Pay;
        int    HowMany = WonPoints(out Pay);
        string what    = HowMany.ToString() + " " + AppSettings.PointsName;

        TrafficGridCrediter crediter = new TrafficGridCrediter(User);

        crediter.CreditUser(Pay, what, TrafficGridPrizeType.Points, HowMany);

        AddWinToTrafficGridTables(what, Pay, User.Name);

        throw new MsgException("[OK]" + what);
    }
Beispiel #2
0
    private static void HandleDRLimit(Member User)
    {
        if (AppSettings.TrafficGrid.TrafficGridDailyMoneyLeft == Money.Zero)
        {
            throw new MsgException(L1.WONNOTHING);
        }

        Money  Won  = new Money(0.1);
        string what = "Direct ref limit +1";

        TrafficGridCrediter crediter = new TrafficGridCrediter(User);

        crediter.CreditUser(Won, what, TrafficGridPrizeType.DirectReferralLimit);

        AddWinToTrafficGridTables(what, Won, User.Name);

        throw new MsgException("[OK]" + what);
    }
Beispiel #3
0
    private static void HandleNewRentedReferrals(Member User)
    {
        Money Won = User.Membership.ReferralRentCost;

        if (Won > AppSettings.TrafficGrid.TrafficGridDailyMoneyLeft || AppSettings.TrafficGrid.TrafficGridDailyMoneyLeft == Money.Zero)
        {
            throw new MsgException(L1.WONNOTHING);
        }

        string what = "1 rented referral";
        TrafficGridCrediter crediter = new TrafficGridCrediter(User);

        crediter.CreditUser(Won, what, TrafficGridPrizeType.RentedReferrals);

        AddWinToTrafficGridTables(what, Won, User.Name);

        throw new MsgException("[OK]" + what);
    }
Beispiel #4
0
    private static void HandleRentalBalance(Member User)
    {
        Money Won = WonMoney();

        if (Won > AppSettings.TrafficGrid.TrafficGridDailyMoneyLeft || AppSettings.TrafficGrid.TrafficGridDailyMoneyLeft == Money.Zero)
        {
            throw new MsgException(L1.WONNOTHING);
        }

        string what = Won.ToString() + " on Traffic Balance";

        TrafficGridCrediter crediter = new TrafficGridCrediter(User);

        crediter.CreditUser(Won, what, TrafficGridPrizeType.TrafficBalance);

        AddWinToTrafficGridTables(what, Won, User.Name);

        throw new MsgException("[OK]" + what);
    }