示例#1
0
 private void tsmiEdit_Click(object sender, EventArgs e)
 {
     try
     {
         EditContract frmEditContract = new EditContract(ContractID);
         frmEditContract.MdiParent   = this.MdiParent;
         frmEditContract.WindowState = FormWindowState.Maximized;
         frmEditContract.Show();
     }
     catch
     {
         MessageBox.Show("加载数据出错,请稍候再试!");
     }
 }
示例#2
0
 private void tsmiSave_Click(object sender, EventArgs e)
 {
     if (dgvContract.SelectedRows.Count <= 0)
     {
         MessageBox.Show("请选择合同进行编辑!");
         return;
     }
     else
     {
         try
         {
             string       ContractId      = dgvContract.SelectedRows[0].Cells["contractid"].Value.ToString();
             EditContract frmEditContract = new EditContract(ContractId);
             frmEditContract.MdiParent   = this.MdiParent;
             frmEditContract.WindowState = FormWindowState.Maximized;
             frmEditContract.Show();
         }
         catch
         { }
     }
 }