private void dataListado_DoubleClick(object sender, EventArgs e) { FormNuevaReservacion form = FormNuevaReservacion.GetInstancia(); FormEditarReservacion form2 = FormEditarReservacion.GetInstancia(); string par1, par2, par3, par4, par5, par6, par7, par8, par9; par1 = Convert.ToString(this.dataListado.CurrentRow.Cells["HAB_ID"].Value); par2 = Convert.ToString(this.dataListado.CurrentRow.Cells["#HABITACION"].Value); par3 = Convert.ToString(this.dataListado.CurrentRow.Cells["HAB_TIPO"].Value); par4 = Convert.ToString(this.dataListado.CurrentRow.Cells["HAB_NUM_CAMAS"].Value); par5 = Convert.ToString(this.dataListado.CurrentRow.Cells["PRECIO"].Value); par6 = Convert.ToString(this.dataListado.CurrentRow.Cells["HAB_ESTADO"].Value); par7 = Convert.ToString(this.dateTimePicker1.Value.ToShortDateString()); par8 = Convert.ToString(this.dateTimePicker2.Value.ToShortDateString()); par9 = DateTime.Now.ToShortDateString(); form.SetHabitacion(par1, par2, par3, par4, par5, par6, par7, par8, par9); form2.SetHabitacion(par1, par2, par3, par4, par5, par6, par7, par8, par9); form.SetCalculateDays(dateTimePicker1.Value, dateTimePicker2.Value); form2.SetCalculateDays(dateTimePicker1.Value, dateTimePicker2.Value); form.newDate = dateTimePicker2.Value; form.oldDate = dateTimePicker1.Value; form2.newDate = dateTimePicker2.Value; form2.oldDate = dateTimePicker1.Value; this.Hide(); }
private void btnEditar_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in dataListado.Rows) { if (Convert.ToBoolean(row.Cells[0].Value)) { FormEditarReservacion form = FormEditarReservacion.GetInstancia(); string par1, par2, par3, par4, par5, par6, par7, par8, par9, par10; string par12, par13, par14, par15, par16, par17, par18, par19, par20, par21; string par22, par23, par24, par25; string par26, par27; par1 = Convert.ToString(row.Cells[1].Value); form.resid = par1; par2 = Convert.ToString(row.Cells[2].Value); par3 = Convert.ToString(row.Cells[3].Value); par4 = Convert.ToString(row.Cells[4].Value); par5 = Convert.ToString(row.Cells[5].Value); par6 = Convert.ToString(row.Cells[6].Value); par7 = Convert.ToString(row.Cells[7].Value); par8 = Convert.ToString(row.Cells[8].Value); par9 = Convert.ToString(row.Cells[9].Value); par10 = Convert.ToString(row.Cells[10].Value); form.SetHabitacion(par2, par3, par4, par5, par6, par7, par8, par9, par10); form.SetCalculateDays(Convert.ToDateTime(par8).Date, Convert.ToDateTime(par9).Date); form.newDate = Convert.ToDateTime(par9).Date; form.oldDate = Convert.ToDateTime(par8).Date; par12 = Convert.ToString(row.Cells[12].Value); par13 = Convert.ToString(row.Cells[13].Value); par14 = Convert.ToString(row.Cells[14].Value); par15 = Convert.ToString(row.Cells[15].Value); par16 = Convert.ToString(row.Cells[16].Value); par17 = Convert.ToString(row.Cells[17].Value); par18 = Convert.ToString(row.Cells[18].Value); par19 = Convert.ToString(row.Cells[19].Value); par20 = Convert.ToString(row.Cells[20].Value); par21 = Convert.ToString(row.Cells[21].Value); form.SetCliente(par12, par13, par14, par15, par16, par17, par18, par19, par20, par21); par22 = Convert.ToString(row.Cells[22].Value); par23 = Convert.ToString(row.Cells[23].Value); par24 = Convert.ToString(row.Cells[24].Value); par25 = Convert.ToString(row.Cells[25].Value); form.SetEmpleado(par22, par23, par24, par25); par26 = Convert.ToString(row.Cells[26].Value); par27 = Convert.ToString(row.Cells[29].Value); form.SetCombox(par26, par27); form.ShowDialog(); } } }
private void enviardatos() { FormEditarReservacion form = FormEditarReservacion.GetInstancia(); form.SetCliente(txtIdCliente.Text, txtNombres.Text, txtApellidos.Text, txtTDocumento.Text, txtNDocumento.Text, Convert.ToString(dtpFechaNacimiento.Value), Convert.ToString(comboxGenero.SelectedItem), txtTelefono.Text, txtPais.Text, txtEmail.Text); }