public static int BuyTopic(int uid, int tid, int posterid, int price, float netamount) { if (price > Scoresets.GetMaxIncPerTopic()) { Scoresets.GetMaxIncPerTopic(); } var user = User.FindByID(uid); if (user == null) { return(-2); } if (PaymentLogs.GetUserExtCredits(user, Scoresets.GetTopicAttachCreditsTrans()) < (float)price) { return(-1); } Discuz.Data.Users.BuyTopic(uid, tid, posterid, price, netamount, Scoresets.GetTopicAttachCreditsTrans()); CreditsFacade.UpdateUserCredits(uid); CreditsFacade.UpdateUserCredits(posterid); return(Discuz.Data.PaymentLogs.CreatePaymentLog(uid, tid, posterid, price, netamount)); }
public static DataTable GetPayLogOutList(int pagesize, int currentpage, int uid) { return(PaymentLogs.LoadPayLogForumName(DatabaseProvider.GetInstance().GetPayLogOutList(pagesize, currentpage, uid))); }
public static DataTable GetPayLogInList(int pagesize, int currentpage, int uid) { return(PaymentLogs.LoadPayLogForumName(Discuz.Data.PaymentLogs.GetPayLogInList(pagesize, currentpage, uid))); }