private void cbxObraSocial_SelectedIndexChanged(object sender, EventArgs e) { this.txbLeyenda.Visible = false; this.txbLeyenda.Enabled = false; if (cbxObraSocial.DataSource == null) { cbxPlan.DataSource = null; } else { this.obrasocial = (ObraSocial)cbxObraSocial.SelectedItem; ObraSocialNegocio obraN = new ObraSocialNegocio(); cbxPlan.DataSource = obraN.PlanObra(this.obrasocial.id); if (cbxPlan.Items.Count > 0) { cbxPlan.SelectedIndex = 0; } ObraSocial aux = (ObraSocial)this.cbxObraSocial.SelectedItem; if (aux.suspendido == true) { this.txbLeyenda.Visible = true; this.txbLeyenda.Text = "Obra Social Suspendida"; } if (aux.estado == 0) { this.txbLeyenda.Visible = true; this.txbLeyenda.Text = "Obra Social con Baja Definitiva"; } } }
private void cbxNombre_SelectedIndexChanged(object sender, EventArgs e) { Habilitar_Campos_OS(); Habilitar_Campos_PL(); this.cbxPlanes.DataSource = null; this.tbxCoseguro.Text = "0"; this.cbxPlanes.Text = ""; this.Obra = (ObraSocial)this.cbxNombre.SelectedItem; ObraSocialNegocio obraN = new ObraSocialNegocio(); this.cbxPlanes.DataSource = obraN.PlanObra(this.Obra.id); if (this.cbxPlanes.Items.Count > 0) { this.cbxPlanes.SelectedIndex = 0; } else { this.tbxCoseguro.Text = "0"; this.cbxPlanes.Text = ""; this.EscribirControles(); } Deshabilitar_Campos_OS(); Deshabilitar_Campos_PL(); }
private void ObtenerPlanes() { this.cbxPlanes.DataSource = null; this.tbxCoseguro.Text = "0"; this.cbxPlanes.Text = ""; ObraSocialNegocio obraN = new ObraSocialNegocio(); this.cbxPlanes.DataSource = obraN.PlanObra(this.Obra.id); if (this.cbxPlanes.Items.Count > 0) { this.cbxPlanes.SelectedIndex = 0; } else { this.EscribirControles(); } }