Exemplo n.º 1
0
 private void btnCancelRemain_Click(object sender, System.EventArgs e)
 {
     try
     {
         if (txtSeat.Text == "")
         {
             throw new BusinessException("展位预留", "请选择展位");
         }
         if (txtSeat.Tag == null || txtSeat.Tag.ToString() == "")
         {
             throw new BusinessException("展位预留", "请选择展位");
         }
         if (null == cmbShow.SelectedItem)
         {
             throw new BusinessException("展位预留", "请选择招聘会");
         }
         if (null == cmbFloor.SelectedItem)
         {
             throw new BusinessException("展位预留", "请选择展位大厅");
         }
         ShowSeat seat = new ShowSeat();
         seat.cnnJobID     = int.Parse(cmbShow.SelectedItem.DataValue.ToString());
         seat.cnvcJobName  = cmbShow.SelectedItem.DisplayText;
         seat.cnvcSeat     = txtSeat.Text;
         seat.cnvcFloor    = cmbFloor.SelectedItem.DataValue.ToString();
         seat.cnvcOperName = this.oper.cnvcOperName;
         seat.cndOperDate  = DateTime.Now;
         JobManage jobManage = new JobManage();
         jobManage.CancelSeatRemain(seat);
         MessageBox.Show(this, "展位取消预留成功!", "展位预留", MessageBoxButtons.OK, MessageBoxIcon.Information);
         LoadPanel();
     }
     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);
     }
 }