private Seat getSeat() { Seat seat = new Seat(); foreach (DataGridViewRow dr in dataGridView1.SelectedRows) { seat.Add(dr.Index); } return seat; }
public PayForm(Movie movie,User user,Seat seats) { InitializeComponent(); this.movie = movie; this.user = user; this.seats = seats; this.total_price = movie.price * seats.Count; textBoxtotalprice.Text = Convert.ToString(this.total_price); textBoxleftmoney.Text = Convert.ToString(user.money); }
//购买跳到payform中 private Seat getSeats() { Seat seats = new Seat(); for (int i = 0; i < this.movie.amount; i++) { if (this.choose[i]) { this.choose[i] = true; seats.Add(i); } } return seats; }