//获取手牌消费金额 public double get_seat_expense(WatcherDBDataContext dc, Seat seat) { var orders = dc.Orders.Where(x => x.systemId == seat.systemId && x.deleteEmployee == null && !x.paid); double money = 0; var tmp_orders = orders.Where(x => x.priceType == null || x.priceType == "停止消费"); if (tmp_orders.Count() != 0) money = tmp_orders.Sum(x => x.money); tmp_orders = orders.Where(x => x.priceType == "每小时"); if (tmp_orders.Count() != 0) money += tmp_orders.Sum(x => x.money * Math.Ceiling((DateTime.Now - x.inputTime).TotalHours)); return Math.Round(money, 0); }
partial void UpdateSeat(Seat instance);
partial void DeleteSeat(Seat instance);
partial void InsertSeat(Seat instance);