Exemplo n.º 1
0
 private void buttonEdit_Click(object sender, EventArgs e)
 {
     if (dataGridViewClothesSearch.SelectedRows.Count == 1)
     {
         Int16 id = 0;
         Int16.TryParse(dataGridViewClothesSearch.SelectedRows[0].Cells[0].Value.ToString(), out id);
         formClothesEdit = new FormClothesEdit(this, id);
         formClothesEdit.SetDefaultFieldValues();
         formClothesEdit.Show();
     }
     else
     {
         if (dataGridViewClothesSearch.SelectedRows.Count > 1)
         {
             MessageBox.Show("Выберите только одну запись");
         }
         else
         {
             MessageBox.Show("Выберите одну запись");
         }
     }
 }
Exemplo n.º 2
0
 private void buttonEdit_Click(object sender, EventArgs e)
 {
     if (dataGridViewClothesSearch.SelectedRows.Count == 1)
       {
     formClothesEdit = new FormClothesEdit();
     Int16 id = 0;
     Int16.TryParse(dataGridViewClothesSearch.SelectedRows[0].Cells[0].Value.ToString(), out id);
     formClothesEdit.setId(id);
     formClothesEdit.SetDefaultFieldValues();
     formClothesEdit.Show();
       }
       else
       {
     if (dataGridViewClothesSearch.SelectedRows.Count > 1)
     {
       MessageBox.Show("Выберите только одну запись");
     }
     else
     {
       MessageBox.Show("Выберите одну запись");
     }
       }
 }
Exemplo n.º 3
0
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     formClothesEdit = new FormClothesEdit();
       formClothesEdit.Show();
 }
Exemplo n.º 4
0
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     formClothesEdit = new FormClothesEdit(this, 0);
     formClothesEdit.Show();
 }