private void btnCancel_Click(object sender, System.EventArgs e) { try { if (this.ultraGrid1.ActiveRow.Cells["状态"].Value.ToString() != "预留") { throw new BusinessException("展位预订设置", "此展位不在预留状态,无法取消预留!"); } ShowSeat seat = new ShowSeat(); seat.cnnJobID = int.Parse(cmbShow.SelectedItem.DataValue.ToString()); seat.cnvcSeat = this.ultraGrid1.ActiveRow.Cells["展位"].Value.ToString(); JobManage jobManage = new JobManage(); jobManage.CancelLeaveSeat(seat); BindSeat(); MessageBox.Show(this, "展位预留成功!", "展位预订设置", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (BusinessException bex) { MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (System.Exception ex) { MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } }