コード例 #1
0
        private void enviarAotroForm()
        {
            Form existe = Application.OpenForms.OfType <Form>().Where(pre => pre.Name.Contains(nombre_form_cargado)).SingleOrDefault <Form>();

            if (existe != null)
            {
                if (nombre_form_cargado == "FormOperacionesCabeceraEdicion")
                {
                    OperacionesForms.FormOperacionesCabeceraEdicion nuevo = (OperacionesForms.FormOperacionesCabeceraEdicion)existe;
                    nuevo.recibirProveedor(dataGridView_proveedores.SelectedCells[3].Value.ToString(), dataGridView_proveedores.SelectedCells[4].Value.ToString());
                }
                if (nombre_form_cargado == "FormOperacionesVencimientos")
                {
                    OperacionesForms.FormOperacionesVencimientos nuevo = (OperacionesForms.FormOperacionesVencimientos)existe;
                    nuevo.recibirProveedor(dataGridView_proveedores.SelectedCells[3].Value.ToString(), dataGridView_proveedores.SelectedCells[4].Value.ToString());
                }
                if (nombre_form_cargado == "FormInsertarContacto")
                {
                    Tareas.FormInsertarContacto nuevo = (Tareas.FormInsertarContacto)existe;
                    nuevo.recibirProveedor(dataGridView_proveedores.SelectedCells[4].Value.ToString(), dataGridView_proveedores.SelectedRows[0].Cells["Email"].Value.ToString(), dataGridView_proveedores.SelectedRows[0].Cells["Telefono"].Value.ToString(), dataGridView_proveedores.SelectedRows[0].Cells["Descripcion"].Value.ToString());
                }
                if (nombre_form_cargado == "FormInsertarGestion")
                {
                    Tareas.FormInsertarGestion nuevo = (Tareas.FormInsertarGestion)existe;
                    nuevo.recibirProveedor(dataGridView_proveedores.SelectedCells[3].Value.ToString(), dataGridView_proveedores.SelectedCells[4].Value.ToString());
                }
            }
            this.Close();
        }
コード例 #2
0
 public FormListadoOrganos(Tareas.FormInsertarGestion formAnt, String idComunidad)
 {
     InitializeComponent();
     this.idComunidad = idComunidad;
     this.formAnt     = formAnt;
 }
コード例 #3
0
 public FormSeleccionarOrgano(Tareas.FormInsertarGestion formAnt, String idComunidad)
 {
     InitializeComponent();
     this.idComunidad = idComunidad;
     this.formAnt     = formAnt;
 }
コード例 #4
0
 public FormCargos(Tareas.FormInsertarGestion form_anterior, String id_comunidad_cargado)
 {
     InitializeComponent();
     this.id_comunidad_cargado = id_comunidad_cargado;
     this.form_anterior        = form_anterior;
 }
コード例 #5
0
        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();
        }