public void BuyerAddPoint(int buyerid, IfoundDbContext db) { var buyer = db.Users.Find(buyerid); buyer.EvaluateTimes++; buyer.BuyerPoint++; }
public void SailerAddPoint(int sailerid, float total, IfoundDbContext db) { var sailer = db.Users.Find(sailerid); sailer.SailerPoint = (sailer.SailerPoint + total) / (sailer.CompleteOrderTimes + 1); sailer.CompleteOrderTimes++; }
public IEnumerable <Auction> ViewProductsInTypes(GoodsType type, IfoundDbContext db) { var auctions = db.Auctions.Where(x => x.AucType == type).AsEnumerable(); return(auctions); }
public IEnumerable <Product> ViewProductsInTypes(GoodsType type, IfoundDbContext db) { var products = db.Products.Where(x => x.PdType == type).AsEnumerable(); return(products); }