Пример #1
0
        //获取手牌消费金额
        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);
        }
Пример #2
0
 partial void UpdateSeat(Seat instance);
Пример #3
0
 partial void DeleteSeat(Seat instance);
Пример #4
0
 partial void InsertSeat(Seat instance);