예제 #1
0
 private void buttonEdit_Click(object sender, EventArgs e)
 {
     if (dataGridViewDetiSearch.SelectedRows.Count == 1)
     {
         childEditForm = new ChildEditForm(this);
         Int32 id = 0;
         Int32.TryParse(dataGridViewDetiSearch.SelectedRows[0].Cells[0].Value.ToString(), out id);
         childEditForm.SetId(id);
         childEditForm.SetDefaultFieldValues();
         childEditForm.Show();
     }
     else
     {
         if (dataGridViewDetiSearch.SelectedRows.Count > 1)
         {
             MessageBox.Show("Выберите только одну запись");
         }
         else
         {
             MessageBox.Show("Выберите одну запись");
         }
     }
 }
예제 #2
0
 private void buttonEdit_Click(object sender, EventArgs e)
 {
     if (dataGridViewDetiSearch.SelectedRows.Count == 1)
       {
     childEditForm = new ChildEditForm();
     Int32 id = 0;
     Int32.TryParse(dataGridViewDetiSearch.SelectedRows[0].Cells[0].Value.ToString(), out id);
     childEditForm.setId(id);
     childEditForm.SetDefaultFieldValues();
     childEditForm.Show();
       }
       else
       {
     if (dataGridViewDetiSearch.SelectedRows.Count > 1)
     {
       MessageBox.Show("Выберите только одну запись");
     }
     else
     {
       MessageBox.Show("Выберите одну запись");
     }
       }
 }
예제 #3
0
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     childEditForm = new ChildEditForm(this);
     childEditForm.Show();
 }
예제 #4
0
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     childEditForm = new ChildEditForm();
       childEditForm.Show();
 }