protected void Page_Load(object sender, EventArgs e) { this.tbxNombre.Enabled = false; this.tbxApellido.Enabled = false; this.tbxFechaDeNacimiento.Text = DateTime.Today.ToString("dd/MM/yyyy"); this.tbxFechaDeNacimiento.Enabled = false; this.tbxMail.Enabled = false; this.tbxNdeAfiliado.Enabled = false; this.tbxObraSocial.Enabled = false; this.tbxPlan.Enabled = false; this.tbxTelefono.Enabled = false; this.TN = new TurnosNegocio(); EspecialidadNegocio especilidadesN = new EspecialidadNegocio(); this.especialidades = especilidadesN.Leer_Activas(); this.ddlEspecialidad.DataSource = this.especialidades; this.ddlEspecialidad.DataTextField = this.especialidades.ElementAt(0).ToString(); this.ddlEspecialidad.DataValueField = this.especialidades.ElementAt(0).ToString(); // Bind the data to the control. this.ddlEspecialidad.DataBind(); this.ddlEspecialidad.SelectedIndex = 0; }
private void frmAltaTurno_Load(object sender, EventArgs e) { this.TN = new Negocio.TurnosNegocio(); EspecialidadNegocio especilidades = new EspecialidadNegocio(); cbxEspecialidad.DataSource = especilidades.Leer_Activas(); this.cbxEspecialidad.Enabled = false; this.cbxFecha.Enabled = false; this.cbxHora.Enabled = false; this.cbxMedico.Enabled = false; this.tbxObservaciones.Enabled = false; this.btnAceptar.Enabled = false; this.btnBuscar.Enabled = true; this.txbLeyenda.Visible = false; this.txtCoseguro.Visible = false; this.txtCoseguro.Enabled = false; this.label15.Visible = false; this.label15.Enabled = false; if (cbxEspecialidad.Items.Count > 0) { cbxEspecialidad.SelectedIndex = 0; } }
private void frmElegirEspecialidadMedico_Load(object sender, EventArgs e) { EspecialidadNegocio especialidadNegocio = new EspecialidadNegocio(); this.lstEspecialidades.DataSource = especialidadNegocio.Leer_Activas(); this.lstEspecialidades.SelectedIndex = 0; }
protected void Page_Load(object sender, EventArgs e) { paciente = (Paciente)this.Session["paciente"]; if (paciente == null) { Response.Redirect("~/Index.aspx"); } if (this.ddlEspecialidad.Items.Count == 0) { if (this.Session["espe"] == null) { this.Session.Add("espe", false); } else { this.Session["espe"] = false; } } this.TN = new TurnosNegocio(); EspecialidadNegocio especilidadesN = new EspecialidadNegocio(); this.especialidades = especilidadesN.Leer_Activas(); try { if (this.Session["espe"].Equals(false)) { this.ddlEspecialidad.DataSource = this.especialidades; this.ddlEspecialidad.DataTextField = "nombre"; this.ddlEspecialidad.DataValueField = "id"; this.ddlEspecialidad.DataBind(); this.ddlEspecialidad.SelectedIndex = 0; this.LlenarMedicos(this.especialidades.ElementAt(0).id); this.Session["espe"] = true; } } catch (Exception ex) { } }