private void Button3_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count == 1) { Int32 a1 = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value); string a2 = Convert.ToString(dataGridView1.CurrentRow.Cells[1].Value); DateTime a3 = Convert.ToDateTime(dataGridView1.CurrentRow.Cells[2].Value); Int32 a4 = Convert.ToInt32(dataGridView1.CurrentRow.Cells[3].Value); Int32 a5 = Convert.ToInt32(dataGridView1.CurrentRow.Cells[4].Value); DateTime a6 = Convert.ToDateTime(dataGridView1.CurrentRow.Cells[5].Value); Int32 a7 = Convert.ToInt32(dataGridView1.CurrentRow.Cells[6].Value); SuperEdicion superEdicion = new SuperEdicion(a7, a1, a2, a4, a5, a3, a6); this.Close(); superEdicion.Show(); } else { MessageBox.Show("No ha seleccionado ningun Cliente"); } }
private void Button5_Click(object sender, RoutedEventArgs e) { SuperEdicion superEdicion = new SuperEdicion(0, 0, "", 0, 0, DateTime.Now, DateTime.Now); superEdicion.Show(); }