protected void ddl_zona_SelectedIndexChanged(object sender, EventArgs e) { this.ddl_posicion.ClearSelection(); if (this.ddl_zona.SelectedIndex != 0) { int id_zona = Convert.ToInt32(this.ddl_zona.SelectedValue); PlayaBC playa = new PlayaBC(); if (rb_mantenimiento.Checked) { utils.CargaDrop(this.ddl_playa, "ID", "DESCRIPCION", playa.ObtenerPlayasXCriterio(null, null, id_zona, false, null)); } else { utils.CargaDrop(this.ddl_playa, "ID", "DESCRIPCION", playa.ObtenerPlayasXCriterioTipoCarga(null, null, id_zona, false, Convert.ToInt32(this.ddl_tipo_carga.SelectedValue), "200")); } ddl_playa.Enabled = true; ddl_playa_SelectedIndexChanged(null, null); } else { ddl_posicion.Enabled = false; ddl_playa.Enabled = false; ddl_posicion.ClearSelection(); ddl_playa.ClearSelection(); } }
protected void ddl_destinoZona2_SelectedIndexChanged(object sender, EventArgs e) { if (this.ddl_destinoZona2.SelectedIndex > 0) { int id_zona = int.Parse(this.ddl_destinoZona2.SelectedValue); PlayaBC playa = new PlayaBC(); utils.CargaDrop(this.ddl_destinoPlaya2, "ID", "DESCRIPCION", playa.ObtenerPlayasXCriterio(null, null, id_zona, false, "100")); if (this.ddl_destinoPlaya1.Items.Count > 1) { this.ddl_destinoPlaya2.Enabled = true; this.ddl_destinoPlaya2_SelectedIndexChanged(null, null); } else { this.ddl_destinoPlaya2.Enabled = false; this.ddl_destinoPos2.Enabled = false; } } else { this.ddl_destinoPos2.Enabled = false; this.ddl_destinoPlaya2.Enabled = false; this.ddl_destinoPos2.SelectedIndex = 0; this.ddl_destinoPlaya2.SelectedIndex = 0; } }
protected void ddl_zona_SelectedIndexChanged(object sender, EventArgs e) { if (this.ddl_zona.SelectedIndex != 0) { int id_zona = Convert.ToInt32(this.ddl_zona.SelectedValue); PlayaBC playa = new PlayaBC(); utils.CargaDrop(this.ddl_playa, "ID", "DESCRIPCION", playa.ObtenerPlayasXCriterio(null, null, id_zona, false, "200")); if (this.ddl_playa.Items.Count > 1) { this.ddl_playa.Enabled = true; if (this.ddl_playa.SelectedIndex != 0) { int id_playa = Convert.ToInt32(this.ddl_playa.SelectedValue); YMS_ZONA_BC yms = new YMS_ZONA_BC(); DataTable ds1 = yms.Obtenerlugares_playa(id_playa, null, "0"); utils.CargaDrop(this.ddl_posicion, "ID", "DESCRIPCION", ds1); if (this.ddl_posicion.Items.Count > 1) { this.ddl_posicion.Enabled = true; } else { this.ddl_posicion.Enabled = false; } } else { this.ddl_posicion.Enabled = false; } } else { this.ddl_playa.Enabled = false; this.ddl_posicion.Enabled = false; } } else { this.ddl_posicion.Enabled = false; this.ddl_playa.Enabled = false; this.ddl_posicion.SelectedIndex = 0; this.ddl_playa.SelectedIndex = 0; } }
protected void ddl_zona_SelectedIndexChanged(object sender, EventArgs e) { if (this.ddl_zona.SelectedIndex != 0) { int id_zona = int.Parse(this.ddl_zona.SelectedValue); PlayaBC playa = new PlayaBC(); utils.CargaDrop(this.ddl_playa, "ID", "DESCRIPCION", playa.ObtenerPlayasXCriterio(null, null, id_zona, false, "200")); ddl_playa_SelectedIndexChanged(null, null); ddl_playa.Enabled = true; } else { ddl_posicion.Enabled = false; ddl_playa.Enabled = false; ddl_posicion.ClearSelection(); ddl_playa.ClearSelection(); } }
protected void ddl_destinoZona1_SelectedIndexChanged(object sender, EventArgs e) { if (!(this.ddl_destinoZona1.SelectedIndex == 0)) { int id_zona = int.Parse(this.ddl_destinoZona1.SelectedValue); PlayaBC playa = new PlayaBC(); utils.CargaDrop(this.ddl_destinoPlaya1, "ID", "DESCRIPCION", playa.ObtenerPlayasXCriterio(null, null, id_zona, false, "100")); if (this.ddl_destinoPlaya1.Items.Count > 1) { this.ddl_destinoPlaya1.Enabled = true; this.ddl_destinoPlaya1_SelectedIndexChanged(null, null); //if (ddl_destinoPlaya1.SelectedIndex != 0) //{ // int id_playa = int.Parse(ddl_destinoPlaya1.SelectedValue); // YMS_ZONA_BC yms = new YMS_ZONA_BC(); // DataTable ds1 = yms.Obtenerlugares_playa(id_playa, null, "0"); // utils.CargaDrop(ddl_destinoPos1, "ID", "DESCRIPCION", ds1); // if (ddl_destinoPos1.Items.Count > 1) // ddl_destinoPos1.Enabled = true; // else // ddl_destinoPos1.Enabled = false; //} } else { this.ddl_destinoPlaya1.Enabled = false; this.ddl_destinoPos1.Enabled = false; } } else { this.ddl_destinoPos1.Enabled = false; this.ddl_destinoPlaya1.Enabled = false; this.ddl_destinoPos1.SelectedIndex = 0; this.ddl_destinoPlaya1.SelectedIndex = 0; } }