private void comboBox_s_comuneros_SelectionChangeCommitted(object sender, EventArgs e) { if (comboBox_s_comuneros.SelectedIndex == 0) { TesoreriaForms.FormAccesoOperacionesTesoreria nueva = new TesoreriaForms.FormAccesoOperacionesTesoreria(id_comunidad.ToString(), id_cuenta.ToString(), "Salida a Comuneros"); nueva.Show(); } else if (comboBox_s_comuneros.SelectedIndex == 1) { TesoreriaForms.Remesas nueva = new TesoreriaForms.Remesas(this, id_comunidad.ToString(), id_cuenta.ToString(), "Remesa de Abono"); nueva.Show(); } else if (comboBox_s_comuneros.SelectedIndex == 2) { if (dataGridView_tesoreria.Rows.Count > 0) { String tipoMov = (Persistencia.SentenciasSQL.select("SELECT IdTipoMov FROM com_dettiposmov WHERE IdDetTipoMov = " + dataGridView_tesoreria.SelectedRows[0].Cells[5].Value.ToString())).Rows[0][0].ToString(); if (tipoMov == "1") { TesoreriaForms.FormDevolucionIngreso nueva = new TesoreriaForms.FormDevolucionIngreso(this, id_comunidad.ToString(), dataGridView_tesoreria.SelectedRows[0].Cells[0].Value.ToString()); nueva.Show(); } else { MessageBox.Show("Debes seleccionar un movimiento de Entrada"); } } } }
private void comboBox_e_proveedor_SelectionChangeCommitted(object sender, EventArgs e) { if (comboBox_e_proveedor.SelectedIndex == 0) { TesoreriaForms.FormAccesoOperacionesTesoreria nueva = new TesoreriaForms.FormAccesoOperacionesTesoreria(id_comunidad.ToString(), id_cuenta.ToString(), "Entrada a Proveedor"); nueva.Show(); } }
private void comboBox_e_comuneros_SelectionChangeCommitted(object sender, EventArgs e) { //ComboBox combo = (ComboBox)sender; if (comboBox_e_comuneros.SelectedIndex == 0) { TesoreriaForms.FormAccesoOperacionesTesoreria nueva = new TesoreriaForms.FormAccesoOperacionesTesoreria(id_comunidad.ToString(), id_cuenta.ToString(), "Ingreso a Comuneros"); nueva.Show(); } else if (comboBox_e_comuneros.SelectedIndex == 1) { TesoreriaForms.Remesas nueva = new TesoreriaForms.Remesas(this, id_comunidad.ToString(), id_cuenta.ToString(), "Remesa de Ingreso"); nueva.Show(); } }
private void comboBox_s_proveedor_SelectionChangeCommitted(object sender, EventArgs e) { // ComboBox combo = (ComboBox)sender; if (comboBox_s_proveedor.SelectedIndex == 0) { TesoreriaForms.FormOperacionesTesoreria nueva = new TesoreriaForms.FormOperacionesTesoreria(this, id_comunidad.ToString(), id_cuenta.ToString(), "Pago"); nueva.Show(); } else if (comboBox_s_proveedor.SelectedIndex == 1) { TesoreriaForms.FormAccesoOperacionesTesoreria nueva = new TesoreriaForms.FormAccesoOperacionesTesoreria(id_comunidad.ToString(), id_cuenta.ToString(), "Pago a Proveedor"); nueva.Show(); } }
private void enviarOtroForm() { Form existe = Application.OpenForms.OfType <Form>().Where(pre => pre.Name.Contains(nombre_form_anterior)).SingleOrDefault <Form>(); if (existe != null) { if (nombre_form_anterior == "FormAltaComunero") { Presentacion.ComunidadesForms.ComunerosForms.FormAltaComunero nuevo = (Presentacion.ComunidadesForms.ComunerosForms.FormAltaComunero)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString()); } //if (nombre_form_anterior == "FormAltaAsociacion") { // Presentacion.ComunidadesForms.DivisionesForms.FormAltaAsociacion nuevo = (Presentacion.ComunidadesForms.DivisionesForms.FormAltaAsociacion) existe; // nuevo.recogerEntidad(dataGridView1.SelectedCells[0].Value.ToString()); //} if (nombre_form_anterior == "FormOperacionesCabeceraEdicion") { Presentacion.ComunidadesForms.OperacionesForms.FormOperacionesCabeceraEdicion nuevo = (Presentacion.ComunidadesForms.OperacionesForms.FormOperacionesCabeceraEdicion)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString()); } if (nombre_form_anterior == "FormOperacionesVencimientos") { ComunidadesForms.OperacionesForms.FormOperacionesVencimientos nuevo = (ComunidadesForms.OperacionesForms.FormOperacionesVencimientos)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormOperacionesEditReparto") { ComunidadesForms.OperacionesForms.FormOperacionesEditReparto nuevo = (ComunidadesForms.OperacionesForms.FormOperacionesEditReparto)existe; nuevo.recogerBloque(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormAccesoOperacionesTesoreria") { ComunidadesForms.TesoreriaForms.FormAccesoOperacionesTesoreria nuevo = (ComunidadesForms.TesoreriaForms.FormAccesoOperacionesTesoreria)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormCrearCuentaComunidad") { ComunidadesForms.TesoreriaForms.FormCrearCuentaComunidad nuevo = (ComunidadesForms.TesoreriaForms.FormCrearCuentaComunidad)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormReasignarOperacion") { ComunidadesForms.DivisionesForms.FormReasignarPagador nuevo = (ComunidadesForms.DivisionesForms.FormReasignarPagador)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormNuevoRecibo") { ComunidadesForms.Recibos.FormNuevoRecibo nuevo = (ComunidadesForms.Recibos.FormNuevoRecibo)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString()); } if (nombre_form_anterior == "FormIngresoFondo") { ComunidadesForms.OperacionesForms.FormIngresoFondo nuevo = (ComunidadesForms.OperacionesForms.FormIngresoFondo)existe; nuevo.recibirComunero(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormAnyadirProveedor") { ComunidadesForms.ProveedoresForms.FormAnyadirProveedor nuevo = (ComunidadesForms.ProveedoresForms.FormAnyadirProveedor)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } if (form_ant.Name.Contains("FormVerTarea")) { Tareas.FormVerTarea nuevo = (Tareas.FormVerTarea)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString()); } if (nombre_form_anterior == "FormInsertarContacto") { Tareas.FormInsertarContacto nuevo = (Tareas.FormInsertarContacto)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[1].Value.ToString(), dataGridView1.SelectedCells[2].Value.ToString(), dataGridView1.SelectedCells[3].Value.ToString()); } if (form_ant.Name.Contains("FormInsertarGestion")) { Tareas.FormInsertarGestion nuevo = (Tareas.FormInsertarGestion)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormGestionesPrincipalEsperaDe") { Tareas.FormGestionesPrincipal nuevo = (Tareas.FormGestionesPrincipal)existe; nuevo.recibirEntidadEspera(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormGestionesPrincipalEntidad") { Tareas.FormGestionesPrincipal nuevo = (Tareas.FormGestionesPrincipal)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormGeneralTareasPrincipal") { Tareas.FormTareasPrincipal nuevo = (Tareas.FormTareasPrincipal)existe; nuevo.recibirEntidad(dataGridView1.SelectedCells[0].Value.ToString(), dataGridView1.SelectedCells[1].Value.ToString()); } } this.Close(); }
private void enviarOtroForm() { Form existe = Application.OpenForms.OfType <Form>().Where(pre => pre.Name.Contains(nombre_form_anterior)).SingleOrDefault <Form>(); if (existe != null) { if (nombre_form_anterior == "FormOperacionesCabeceraEdicion") { OperacionesForms.FormOperacionesCabeceraEdicion nuevo = (OperacionesForms.FormOperacionesCabeceraEdicion)existe; nuevo.recibirComunero(dataGridView_comuneros.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormOperacionesVencimientos") { OperacionesForms.FormOperacionesVencimientos nuevo = (OperacionesForms.FormOperacionesVencimientos)existe; nuevo.recibirComunero(dataGridView_comuneros.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormReasignarOperacion") { DivisionesForms.FormReasignarPagador nuevo = (DivisionesForms.FormReasignarPagador)existe; nuevo.recibirEntidad(dataGridView_comuneros.SelectedCells[1].Value.ToString(), dataGridView_comuneros.SelectedCells[2].Value.ToString()); } if (nombre_form_anterior == "FormAltaAsociacion") { DivisionesForms.FormAltaAsociacion nuevo = (DivisionesForms.FormAltaAsociacion)existe; nuevo.recibirComunero(dataGridView_comuneros.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormAccesoOperacionesTesoreria") { TesoreriaForms.FormAccesoOperacionesTesoreria nuevo = (TesoreriaForms.FormAccesoOperacionesTesoreria)existe; nuevo.recibirEntidad(dataGridView_comuneros.SelectedCells[1].Value.ToString(), dataGridView_comuneros.SelectedCells[2].Value.ToString()); } if (nombre_form_anterior == "FormIngresoFondo") { OperacionesForms.FormIngresoFondo nuevo = (OperacionesForms.FormIngresoFondo)existe; nuevo.recibirComunero(dataGridView_comuneros.SelectedCells[1].Value.ToString(), dataGridView_comuneros.SelectedCells[2].Value.ToString()); } if (nombre_form_anterior == "FormCompensarAnticipos") { OperacionesForms.FormCompensarAnticipos nuevo = (OperacionesForms.FormCompensarAnticipos)existe; nuevo.recibirEntidad(dataGridView_comuneros.SelectedCells[1].Value.ToString(), dataGridView_comuneros.SelectedCells[2].Value.ToString()); } if (nombre_form_anterior == "FormAnyadirReglaDetalle") { DivisionesForms.ReglasPago.FormAnyadirReglaDetalle nuevo = (DivisionesForms.ReglasPago.FormAnyadirReglaDetalle)existe; nuevo.recibirComunero(dataGridView_comuneros.SelectedCells[0].Value.ToString(), dataGridView_comuneros.SelectedCells[2].Value.ToString()); } if (nombre_form_anterior == "FormCargosAlta") { CargosForms.FormCargosAlta nuevo = (CargosForms.FormCargosAlta)existe; nuevo.recibirComunero(dataGridView_comuneros.SelectedCells[0].Value.ToString(), dataGridView_comuneros.SelectedCells[2].Value.ToString(), dataGridView_comuneros.SelectedCells[1].Value.ToString()); } if (nombre_form_anterior == "FormAbonarVencimiento") { OperacionesForms.FormAbonarVencimiento nuevo = (OperacionesForms.FormAbonarVencimiento)existe; nuevo.recibirComunero(dataGridView_comuneros.SelectedCells[1].Value.ToString(), dataGridView_comuneros.SelectedCells[2].Value.ToString()); } if (nombre_form_anterior == "FormInsertarContacto") { Tareas.FormInsertarContacto nuevo = (Tareas.FormInsertarContacto)existe; nuevo.recibirComunero(dataGridView_comuneros.SelectedCells[0].Value.ToString(), dataGridView_comuneros.SelectedCells[2].Value.ToString(), textBox_EMail.Text); } if (nombre_form_anterior == "FormInsertarGestion") { Tareas.FormInsertarGestion nuevo = (Tareas.FormInsertarGestion)existe; nuevo.recibirComunero(dataGridView_comuneros.SelectedCells[1].Value.ToString(), dataGridView_comuneros.SelectedCells[2].Value.ToString()); } } this.Close(); }