Exemple #1
0
        //阅读文章收费的方法
        private void ReadArticleCharge(M_UserInfo userinfo, M_Node nodeinfo, B_User buser, B_CompleteHistory bcomhistory, int GeneralID)
        {
            //function.WriteMessage("当前文章阅读为10点券每次,您重复阅读4次后收费", "/content.aspx", "收费提示");
            M_CompleteHistory mcomhistory = new M_CompleteHistory();

            mcomhistory.AddTime  = DateTime.Now;
            mcomhistory.BidType  = 0;
            mcomhistory.BidPrice = nodeinfo.ConsumePoint;
            mcomhistory.IP       = HttpContext.Current.Request.UserHostAddress;
            mcomhistory.ComeType = 0;
            mcomhistory.CouType  = "减值";
            mcomhistory.ShopId   = GeneralID;   //会员[admin]浏览ID为101的文章扣除点券
            mcomhistory.Remark   = "会员:" + userinfo.UserName + " 浏览ID为" + GeneralID + "的文章扣除" + nodeinfo.ConsumePoint.ToString() + "点点券";
            mcomhistory.UserId   = buser.GetLogin().UserID;
            int result = bcomhistory.GetInsert(mcomhistory);                                            //新增收费记录信息

            buser.UpdateUserPoint(userinfo.UserPoint - nodeinfo.ConsumePoint, buser.GetLogin().UserID); //扣点券
        }