Example #1
0
 private void toolStripButton2_Click(object sender, EventArgs e) //修改
 {
     colCount = gridView2.Columns.Count();
     array    = new string[colCount];
     for (int i = 0; i < colCount; i++)
     {
         array[i] = gridView2.GetFocusedRowCellDisplayText(gridView2.Columns[i]);
     }
     if (array[0].Length > 0)
     {
         isExist = true;
         nc      = new New_CapitalAccount();
         nc.ShowDialog();
     }
     else
     {
         MessageBox.Show("该条数据不含主键,无法修改");
     }
 }
Example #2
0
 private void toolStripButton1_Click(object sender, EventArgs e) //新建
 {
     isExist = false;
     nc      = new New_CapitalAccount();
     nc.ShowDialog();
 }