private void dataListado_DoubleClick(object sender, EventArgs e) { if (add) { FrmNewAppointment form = FrmNewAppointment.GetInstancia(); string par1, par2; par1 = Convert.ToString(this.dataListado.CurrentRow.Cells["id"].Value); par2 = Convert.ToString(this.dataListado.CurrentRow.Cells["name"].Value); form.setCustumer(par1, par2); this.Hide(); } else { FrmAppointment form = FrmAppointment.GetInstancia(); string par1, par2; par1 = Convert.ToString(this.dataListado.CurrentRow.Cells["id"].Value); par2 = Convert.ToString(this.dataListado.CurrentRow.Cells["name"].Value); form.setCustumer(par1, par2); this.Hide(); } this.add = false; this.update = false; }