//编辑手牌 private void editTool_Click(object sender, EventArgs e) { if (dgv.CurrentCell == null) { GeneralClass.printErrorMsg("没有选择行!"); return; } int r = dgv.CurrentCell.RowIndex; int c = dgv.CurrentCell.ColumnIndex; var seat = db.Seat.FirstOrDefault(x => x.text == dgv.CurrentRow.Cells[0].Value.ToString()); SeatForm editSeat = new SeatForm(db, seat, this); if (editSeat.ShowDialog() == DialogResult.OK) { dgv_show(); dgv.CurrentCell = dgv[c, r]; } }
//新增手牌 private void addTool_Click(object sender, EventArgs e) { SeatForm addSeat = new SeatForm(db, null, this); addSeat.ShowDialog(); }