private void btnAdd_Click(object sender, EventArgs e) { FrmAddRenta frm = new FrmAddRenta(); this.Hide(); frm.ShowDialog(); }
private void btnEdit_Click(object sender, EventArgs e) { int rowindex = dataGridRenta.CurrentCell.RowIndex; int columnindex = dataGridRenta.CurrentCell.ColumnIndex; FrmAddRenta fed = new FrmAddRenta(); this.Hide(); fed.values = Int32.Parse(dataGridRenta.Rows[rowindex].Cells[columnindex].Value.ToString()); fed.ShowDialog(); }