//确定 private void btnOk_Click(object sender, EventArgs e) { if (rbtnAll.Checked) { var seats = db.Seat.Where(x => x.status == 2 || x.status == 6 || x.status == 7 || x.status == 8); foreach (var seat in seats) { print_seat_bill(seat); } } else if (radioshoe.Checked) { var seats = db.Seat.Where(x => x.status == 2 || x.status == 6 || x.status == 7); PrintCheckSeatBills.Print_DataGridView(seats.Select(x => x.text).ToList(), db.Options.FirstOrDefault().companyName); } else if (rBtnSeat.Checked) { var seat = db.Seat.FirstOrDefault(x => x.text == seatBox.Text); if (seat == null) { BathClass.printErrorMsg("手牌号不存在"); return; } if (seat.status != 2 && seat.status != 6 && seat.status != 7 && seat.status != 8) { BathClass.printErrorMsg("手牌号不在使用中,不能预打账单"); return; } print_seat_bill(seat); } else if (rBtnTechAll.Checked)//预打技师对账单汇总 { var form = new TechAllForm(); form.ShowDialog(); } else if (rBtnTechDetails.Checked)//预打技师对账单明细 { var form = new TechDetailsForm(); form.ShowDialog(); } }
//确定 private void btnOk_Click(object sender, EventArgs e) { if (rbtnAll.Checked) { var seats = db.Seat.Where(x => x.status == 2 || x.status == 6 || x.status == 7 || x.status == 8); foreach (var seat in seats) { print_seat_bill(seat); } } else if (radioshoe.Checked) { var seats = db.Seat.Where(x => x.status == 2 || x.status == 6 || x.status == 7); PrintCheckSeatBills.Print_DataGridView(seats.Select(x => x.text).ToList(), db.Options.FirstOrDefault().companyName); } else if (rBtnSeat.Checked) { var seat = db.Seat.FirstOrDefault(x => x.text == seatBox.Text); if (seat==null) { BathClass.printErrorMsg("手牌号不存在"); return; } if (seat.status != 2 && seat.status != 6 && seat.status != 7 && seat.status != 8) { BathClass.printErrorMsg("手牌号不在使用中,不能预打账单"); return; } print_seat_bill(seat); } else if (rBtnTechAll.Checked)//预打技师对账单汇总 { var form = new TechAllForm(); form.ShowDialog(); } else if (rBtnTechDetails.Checked)//预打技师对账单明细 { var form = new TechDetailsForm(); form.ShowDialog(); } }