private void llenarForm() { SolicitudBC s = new SolicitudBC(); TrailerBC t = new TrailerBC(); LugarBC l = new LugarBC(); ZonaBC z = new ZonaBC(); s = s.ObtenerXId(int.Parse(hf_idSolicitud.Value)); hf_timestamp.Value = s.TIMESTAMP.ToString(); t = t.obtenerXID(s.ID_TRAILER); l = l.obtenerXID(t.LUGAR_ID); utils.CargaDropTodos(ddl_editZona, "ID", "DESCRIPCION", z.ObtenerXSite(s.ID_SITE, false)); ddl_editZona.SelectedValue = l.ID_ZONA.ToString(); ddl_editZona_IndexChanged(null, null); ddl_editPlaya.SelectedValue = l.ID_PLAYA.ToString(); ddl_editPlaya_IndexChanged(null, null); try { ddl_editPos.SelectedValue = l.ID.ToString(); } catch (Exception e) {} ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "modalPosicion();", true); }
protected void ddl_buscarSite_onChange(object sender, EventArgs e) { ZonaBC zona = new ZonaBC(); int site_id = Convert.ToInt32(this.ddl_buscarSite.SelectedValue); this.utils.CargaDrop(this.ddl_zona, "ID", "DESCRIPCION", zona.ObtenerXSite(site_id, true)); }
protected void gv_listar_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "ASIGNAR") { this.LimpiarTodo(); RemoProgDistribuicionBC r = new RemoProgDistribuicionBC(); this.hf_idRPD.Value = e.CommandArgument.ToString(); int id = Convert.ToInt32(this.hf_idRPD.Value); r = r.ObtenerXId(id); this.hf_idSite.Value = r.SITE_ID.ToString(); ZonaBC z = new ZonaBC(); this.utils.CargaDrop(this.ddl_asignarZona, "ID", "DESCRIPCION", z.ObtenerXSite(r.SITE_ID, false)); this.ObtenerSeleccionados(true); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "modalAsignar();", true); } if (e.CommandName == "EDITAR") { this.LimpiarTodo(); RemoProgDistribuicionBC r = new RemoProgDistribuicionBC(); this.hf_idRPD.Value = e.CommandArgument.ToString(); int id = Convert.ToInt32(this.hf_idRPD.Value); r = r.ObtenerXId(id); this.ddl_editSite.SelectedValue = r.SITE_ID.ToString(); this.txt_editDesc.Text = r.DESCRIPCION; ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "modalRemoProg();", true); } if (e.CommandName == "ACTIVAR") { this.hf_idRPD.Value = e.CommandArgument.ToString(); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "modalConfirmar();", true); } }
protected void ddl_buscarSite_onChange(object sender, EventArgs e) { ZonaBC zona = new ZonaBC(); int site_id = int.Parse(this.ddl_buscarSite.SelectedValue); this.utils.CargaDrop(this.ddl_bloqZona, "ID", "DESCRIPCION", zona.ObtenerXSite(site_id, false)); }
protected void ddl_siteinventario_onChange(object sender, EventArgs e) { ZonaBC zona = new ZonaBC(); int site_id = int.Parse(ddl_siteinventario.SelectedValue); utils.CargaDrop(ddl_zonainventario, "ID", "DESCRIPCION", zona.ObtenerXSite(site_id, false)); }
protected void ddl_site_SelectedIndexChanged(object sender, EventArgs e) { ZonaBC z = new ZonaBC(); utils.CargaDrop(ddl_buscarZona, "ID", "DESCRIPCION", z.ObtenerXSite(int.Parse(ddl_site.SelectedValue), true)); ObtenerPlaya(true); }
private void ObtenerZona(bool forzarBD) { if (ViewState["lista"] == null || forzarBD) { ZonaBC z = new ZonaBC(); z.DESCRIPCION = txt_buscarNombre.Text; z.SITE_ID = Convert.ToInt32(ddl_buscarSite.SelectedValue); z.ZOTI_ID = Convert.ToInt32(ddl_buscarTipoZona.SelectedValue); DataTable dt = z.ObtenerXParametrosMant(z); ViewState["lista"] = dt; ViewState.Remove("filtrados"); } DataView dw; if ((DataTable)ViewState["filtrados"] == null) { dw = new DataView((DataTable)ViewState["lista"]); } else { dw = new DataView((DataTable)ViewState["filtrados"]); } if (ViewState["sortExpresion"] != null && ViewState["sortExpresion"].ToString() != "") { dw.Sort = (String)ViewState["sortExpresion"]; } this.gv_listar.DataSource = dw; this.gv_listar.DataBind(); }
protected void rb_pos_CheckedChanged(object sender, EventArgs e) { if (hf_idTrailer.Value != "") { if (rb_posAuto.Checked) { CargaTipoBC ct = new CargaTipoBC(); if (ct.CargaDestinos(int.Parse(this.ddl_tipo_carga.SelectedValue)).Rows.Count == 0) { LugarBC l = new LugarBC(); ddl_zona.Enabled = false; ddl_playa.Enabled = false; ddl_posicion.Enabled = false; l = l.obtenerLugarAuto(int.Parse(dropsite.SelectedValue), usuario.ID, null); if (l.ID == 0 || l.ID == null) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", "alert('Error. Intente designar un lugar manualmente.');", true); } else { PlayaBC p = new PlayaBC(); ZonaBC zona = new ZonaBC(); try { ddl_zona.SelectedValue = l.ID_ZONA.ToString(); } catch (Exception ex) { zona = zona.ObtenerXId(l.ID_ZONA); ddl_zona.Items.Add(new System.Web.UI.WebControls.ListItem(zona.DESCRIPCION, zona.ID.ToString())); ddl_zona.SelectedValue = zona.ID.ToString(); } utils.CargaDrop(this.ddl_playa, "ID", "DESCRIPCION", p.ObtenerXZona(l.ID_ZONA)); ddl_playa.SelectedValue = l.ID_PLAYA.ToString(); LugarBC lugar = new LugarBC(); CargaDrops drops = new CargaDrops(); drops.Lugar1(ddl_posicion, 0, l.ID_PLAYA, 0, 1); //utils.CargaDrop(this.ddl_posicion, "ID", "DESCRIPCION", lugar.ObtenerXPlaya(l.ID_PLAYA)); ddl_posicion.SelectedValue = l.ID.ToString(); } } } else { ddl_zona.Enabled = true; if (ddl_playa.SelectedIndex > 0) { ddl_playa.Enabled = true; } if (ddl_posicion.SelectedIndex > 0) { ddl_posicion.Enabled = true; } } } }
protected void ddl_site_SelectedIndexChanged(object sender, EventArgs e) { // PlayaBC p = new PlayaBC(); int site_id = Convert.ToInt32(ddl_site.SelectedValue); // utils.CargaDropTodos(ddl_playa, "ID", "DESCRIPCION", p.ObtenerDrop(site_id)); ZonaBC z = new ZonaBC(); utils.CargaDropTodos(ddl_Zona, "ID", "DESCRIPCION", z.ObtenerXSite(site_id, false)); ddl_editZona_IndexChanged(null, null); // this.ObtenerReporte(true); }
protected void drop_SelectedIndexChanged(object sender, EventArgs e) { TrailerBC t = new TrailerBC(); ZonaBC z = new ZonaBC(); z.DESCRIPCION = ""; z.SITE_ID = Convert.ToInt32(this.dropsite.SelectedValue); z.ZOTI_ID = 200; utils.CargaDrop(this.ddl_destinoZona1, "ID", "DESCRIPCION", z.ObtenerXParametros()); utils.CargaDrop(this.ddl_destinoZona2, "ID", "DESCRIPCION", z.ObtenerXParametros()); utils.CargaDrop(this.ddl_buscarPatente, "ID", "PLACA", t.obtenerDisponiblesDrop(Convert.ToInt32(this.dropsite.SelectedValue), false, false)); }
protected void gv_listar_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "EDITAR") { SiteBC site = new SiteBC(); hf_idSite.Value = e.CommandArgument.ToString(); site = site.ObtenerXId(Convert.ToInt32(hf_idSite.Value)); txt_editNombre.Text = site.NOMBRE; txt_editDesc.Text = site.DESCRIPCION; ddl_editEmpresa.SelectedValue = site.EMPRESA_ID.ToString(); txt_editCodSap.Text = site.COD_SAP.ToString(); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "modalSite();", true); } if (e.CommandName == "ELIMINAR") { hf_idSite.Value = e.CommandArgument.ToString(); lblRazonEliminacion.Text = "Eliminar Site"; msjEliminacion.Text = "Se eliminará el Site seleccionado, ¿desea continuar?"; ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "modalConfirmacion();", true); } if (e.CommandName == "ACTIVAR") { SiteBC site = new SiteBC(); if (site.TrailerAuto(u.ID, Convert.ToInt32(e.CommandArgument.ToString()))) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", "alert('Todo OK');", true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", "alert('Error');", true); } ObtenerSite(true); } if (e.CommandName == "VIRTUAL") { hf_idSite.Value = e.CommandArgument.ToString(); SiteBC site = new SiteBC(); site.ObtenerXId(Convert.ToInt32(hf_idSite.Value)); ZonaBC z = new ZonaBC(); utils.CargaDrop(ddl_virtualZona, "ID", "DESCRIPCION", z.ObtenerXSite(Convert.ToInt32(hf_idSite.Value), true)); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "modalVirtual();", true); YMS_ZONA_BC p = new YMS_ZONA_BC(); DataTable dt = p.ObtenerPlayas_Site(Convert.ToInt32(hf_idSite.Value), "", "1"); if (dt.Rows.Count == 1) { ddl_virtualZona.SelectedValue = dt.Rows[0]["zona_id"].ToString(); ddl_virtualZona_SelectedIndexChanged(null, null); ddl_virtualPlaya.SelectedValue = dt.Rows[0]["id"].ToString(); } } }
protected void ddl_destinoSite_IndexChanged(object sender, EventArgs e) { if (this.ddl_destinoSite.SelectedIndex > 0) { ZonaBC z = new ZonaBC(); this.utils.CargaDrop(this.ddl_destinoZona, "ID", "DESCRIPCION", z.ObtenerXSite(Convert.ToInt32(this.ddl_destinoSite.SelectedValue), true)); this.ddl_destinoZona.Enabled = true; } else { this.ddl_destinoZona.ClearSelection(); this.ddl_destinoZona.Enabled = false; } this.ddl_destinoZona_IndexChanged(null, null); }
protected void btn_EliminarZona_Click(object sender, EventArgs e) { ZonaBC zona = new ZonaBC(); if (zona.Eliminar(int.Parse(hf_idZona.Value))) { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "alert('Zona eliminada exitosamente');", true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "alert('Ocurrió un error al eliminar zona. Revise si tiene otros datos asociados');", true); } ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cerrar", "cerrarModal('modalConfirmacion');", true); ObtenerZona(true); }
private void CargaDropZona(int tipo) { ZonaBC z = new ZonaBC(); int site_id = Convert.ToInt32(dropsite.SelectedValue); DataTable dt = new DataTable(); switch (tipo) { case 1: // zonas no LI dt = z.ObtenerLI(site_id, 400, false, 0); break; case 2: // zonas LI dt = z.ObtenerLI(site_id, 400, true, 0); break; case 3: // zonas que contengan estacionamientos dt = z.ObtenerLI(site_id, 0, false, 200); break; case 4: // zonas que contengan andenes dt = z.ObtenerLI(site_id, 0, false, 100); break; case 5: // zonas LI que contengan andenes dt = z.ObtenerLI(site_id, 400, true, 100); break; case 6: // zonas no LI que contengan andenes dt = z.ObtenerLI(site_id, 400, false, 100); break; case 7: // zonas LI que contengan estacionamientos dt = z.ObtenerLI(site_id, 400, true, 200); break; case 8: // zonas no LI que contengan estacionamientos dt = z.ObtenerLI(site_id, 400, false, 200); break; default: dt = z.ObtenerLI(site_id); break; } utils.CargaDrop(ddl_zona, "ID", "DESCRIPCION", dt); ddl_zona_SelectedIndexChanged(null, null); }
protected void Page_Load(object sender, EventArgs e) { ZonaBC zona = new ZonaBC(); PlayaBC playa = new PlayaBC(); LugarBC lugar = new LugarBC(); TransportistaBC transportista = new TransportistaBC(); if (!this.IsPostBack) { this.txt_fechaMovimiento.Text = DateTime.Now.ToShortDateString(); utils.CargaDrop(this.ddl_transportista, "ID", "NOMBRE", transportista.ObtenerTodos()); YMS_ZONA_BC yms = new YMS_ZONA_BC(); DataTable ds = yms.ObteneSites(((UsuarioBC)Session["Usuario"]).ID); utils.CargaDropNormal(this.dropsite, "ID", "NOMBRE", ds); this.drop_SelectedIndexChanged(null, null); } }
protected void gv_listar_RowEditing(object sender, GridViewEditEventArgs e) { ZonaBC zona = new ZonaBC(); gv_listar.SelectedIndex = e.NewEditIndex; hf_idZona.Value = this.gv_listar.SelectedDataKey.Value.ToString(); zona = zona.ObtenerXId(int.Parse(hf_idZona.Value)); txt_editCodigo.Text = zona.CODIGO.ToString(); txt_editDesc.Text = zona.DESCRIPCION; ddl_editSite.SelectedValue = zona.SITE_ID.ToString(); ddl_editTipoZona.SelectedValue = zona.ZOTI_ID.ToString(); //txt_editPosX.Text = zona.ZONA_X.ToString(); //txt_editPosY.Text = zona.ZONA_Y.ToString(); //txt_editRotacion.Text = zona.ROTACION.ToString(); //txt_editAltura.Text = zona.ALTURA.ToString(); //txt_editAnchura.Text = zona.ANCHURA.ToString(); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "modalEditarZona();", true); }
protected void recargaplayas(object sender, EventArgs e) { ZonaBC zona = new ZonaBC(); if (this.ddl_Site.SelectedIndex != 0) { YMS_ZONA_BC yms = new YMS_ZONA_BC(); int site = int.Parse(this.ddl_Site.SelectedValue); DataTable dt = yms.ObtenerZonas(site, "", null); this.ltl_menuZonas.Text = this.crearMenu(dt); //Variable de sesión, cambiar dt.Clear(); dt = yms.ObtenerZonas(site, "", null); this.crearPlayasLugares2(dt); } ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "aciva", "reactivatab();", true); this.upplayas.Update(); }
protected void gv_listar_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "ELIMINAR") { hf_idPlaya.Value = e.CommandArgument.ToString(); lblRazonEliminacion.Text = "Eliminar Tipo Playa"; msjEliminacion.Text = "Se eliminará el tipo zona seleccionado, ¿desea continuar?"; btnModalEliminar.Attributes.Remove("onclick"); btnModalEliminar.Attributes.Add("onclick", "eliminarPlaya();"); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "modalConfirmacion();", true); } if (e.CommandName == "DESTINO") { hf_idPlaya.Value = e.CommandArgument.ToString(); PlayaBC p = new PlayaBC(); p = p.ObtenerPlayaXId(int.Parse(hf_idPlaya.Value)); hf_idSite.Value = p.SITE_ID.ToString(); ZonaBC z = new ZonaBC(); utils.CargaDrop(ddl_destinoZona, "ID", "DESCRIPCION", z.ObtenerXSite(p.SITE_ID, true)); ObtenerSeleccionados(true); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "modalDestino();", true); } }
protected void gv_listar_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "ELIMINAR") { hf_idZona.Value = e.CommandArgument.ToString(); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "modalConfirmacion();", true); } if (e.CommandName == "VIRTUAL") { hf_idZona.Value = e.CommandArgument.ToString(); ZonaBC z = new ZonaBC(); int index = Convert.ToInt32(hf_idZona.Value); if (z.Virtual(index)) { ObtenerZona(true); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "mensaje", "alert('Todo OK');", true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "mensaje", "alert('Error');", true); } } }
protected void btn_editGrabar_Click(object sender, EventArgs e) { ZonaBC zona = new ZonaBC(); zona.CODIGO = txt_editCodigo.Text; zona.DESCRIPCION = txt_editDesc.Text; zona.SITE_ID = int.Parse(ddl_editSite.SelectedValue); zona.ZOTI_ID = int.Parse(ddl_editTipoZona.SelectedValue); if (string.IsNullOrEmpty(hf_idZona.Value)) { if (zona.Crear(zona)) { ObtenerZona(true); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "alert('Zona creada exitosamente');", true); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cerrar", "cerrarModal('modalZona');", true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "alert('Ocurrió un error al agregar zona. Intente nuevamente.');", true); } } else { zona.ID = int.Parse(hf_idZona.Value); if (zona.Modificar(zona)) { ObtenerZona(true); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "alert('Zona modificado exitosamente');", true); ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cerrar", "cerrarModal('modalZona');", true); } else { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "modal", "alert('Ocurrió un error al modificar zona. Intente nuevamente.');", true); } } }
protected void gv_listar_RowCommand(object sender, GridViewCommandEventArgs e) { Session["panel"] = null; UsuarioBC usuario = new UsuarioBC(); if (e.CommandName == "EDITAR") { limpiarTodo(); hf_idUsuario.Value = e.CommandArgument.ToString(); usuario = usuario.ObtenerPorId(Convert.ToInt32(hf_idUsuario.Value)); llenarForm(usuario); utils.AbrirModal(this, "modalEdit"); } if (e.CommandName == "ACTIVAR") { hf_idUsuario.Value = e.CommandArgument.ToString(); usuario = usuario.ObtenerPorId(Convert.ToInt32(hf_idUsuario.Value)); lblRazonEliminacion.Text = "Activar/Desactivar Usuario"; if (usuario.ESTADO) { msjEliminacion.Text = "Se desactivará el usuario seleccionado, ¿desea continuar?"; btn_Activar.Visible = false; btn_Desactivar.Visible = true; } else { msjEliminacion.Text = "Se activará el usuario seleccionado, ¿desea continuar?"; btn_Activar.Visible = true; btn_Desactivar.Visible = false; } utils.AbrirModal(this, "modalConf"); } if (e.CommandName == "ASIGNAR") { hf_idUsuario.Value = e.CommandArgument.ToString(); DataTable dt = usuario.ObtenerLugaresAsignados(Convert.ToInt32(hf_idUsuario.Value)); if (dt.Rows.Count == 0) { utils.ShowMessage(this, "Usuario no tiene sites asignados.", "warn", true); return; } Session["sites"] = dt; ZonaBC z = new ZonaBC(); PlayaBC p = new PlayaBC(); LugarBC l = new LugarBC(); if (pnl_asignar.FindControl("mipanel") == null) { panel_ddl = new Panel(); panel_ddl.ID = "mipanel"; panel_ddl.EnableViewState = true; pnl_asignar.Controls.Add(panel_ddl); } else { panel_ddl = (Panel)pnl_asignar.FindControl("mipanel"); panel_ddl.Controls.Clear(); } foreach (DataRow dr in dt.Rows) { creaddl(dr["NOMBRE_SITE"].ToString(), dr["SITE_ID"].ToString()); DropDownList ddlzona = (DropDownList)panel_ddl.FindControl(dr["SITE_ID"].ToString() + "ZONA__DDL"); // new DropDownList(); DropDownList ddlplaya = (DropDownList)panel_ddl.FindControl(dr["SITE_ID"].ToString() + "PLAYA__DDL"); // new DropDownList(); DropDownList ddllugar = (DropDownList)panel_ddl.FindControl(dr["SITE_ID"].ToString() + "LUGAR__DDL"); // new DropDownList(); int site_id = Convert.ToInt32(dr["SITE_ID"].ToString()); // Panel pn = new Panel(); // pn.CssClass = "col-xs-3"; utils.CargaDrop(ddlzona, "ID", "DESCRIPCION", z.ObtenerXSite(site_id, true)); // DropDownList ddl2 = new DropDownList(); if (!string.IsNullOrEmpty(dr["LUGA_ID"].ToString())) { l = l.obtenerXID(Convert.ToInt32(dr["LUGA_ID"].ToString())); ddlzona.SelectedValue = l.ID_ZONA.ToString(); DDL_ZONA_INDEX_CHANGED(ddlzona, null); ddlplaya.SelectedValue = l.ID_PLAYA.ToString(); DDL_playa_INDEX_CHANGED(ddlplaya, null); ddllugar.SelectedValue = l.ID.ToString(); } else { DDL_ZONA_INDEX_CHANGED(ddlzona, null); } } Session["panel"] = panel_ddl; utils.AbrirModal(this, "modalAsignar"); } }
public bool Modificar(ZonaBC zona) { return(tran.Zona_Modificar(zona)); }
public bool Crear(ZonaBC zona) { return(tran.Zona_Crear(zona)); }
public DataTable ObtenerXParametrosMant(ZonaBC z) { return(tran.Zona_ObtenerXParametrosMant(z)); }
protected void rb_pos_CheckedChanged(object sender, EventArgs e) { if (hf_idTrailer.Value != "") { if (rb_posAuto.Checked) { CargaTipoBC ct = new CargaTipoBC(); if (ct.CargaDestinos(Convert.ToInt32(ddl_tipo_carga.SelectedValue)).Rows.Count == 0) { LugarBC l = new LugarBC(); ddl_zona.Enabled = false; ddl_playa.Enabled = false; ddl_posicion.Enabled = false; l = l.obtenerLugarAuto(Convert.ToInt32(dropsite.SelectedValue), usuario.ID, null); if (l.ID == 0) { utils.ShowMessage2(this, "posicion", "warn_posAuto"); return; } try { try { ddl_zona.SelectedValue = l.ID_ZONA.ToString(); } catch (Exception) { ZonaBC zona = new ZonaBC(); zona = zona.ObtenerXId(l.ID_ZONA); ddl_zona.Items.Add(new System.Web.UI.WebControls.ListItem(zona.DESCRIPCION, zona.ID.ToString())); ddl_zona.SelectedValue = zona.ID.ToString(); } ddl_zona_SelectedIndexChanged(null, null); ddl_playa.SelectedValue = l.ID_PLAYA.ToString(); ddl_playa_SelectedIndexChanged(null, null); ddl_posicion.SelectedValue = l.ID.ToString(); } catch (Exception) { ddl_zona.ClearSelection(); ddl_zona_SelectedIndexChanged(null, null); } } } else if (rb_posManual.Checked == true) { tipo_carga_SelectedIndexChanged(null, null); ddl_zona.Enabled = true; ddl_playa.Enabled = (ddl_playa.SelectedIndex > 0); ddl_posicion.Enabled = (ddl_posicion.SelectedIndex > 0); } else if (this.rb_mantenimiento.Checked) { ZonaBC zona = new ZonaBC(); utils.CargaDrop(this.ddl_zona, "ID", "DESCRIPCION", zona.ObtenerXCriterio("", Convert.ToInt32(this.dropsite.SelectedValue), 204)); ddl_zona_SelectedIndexChanged(null, null); ddl_zona.Enabled = true; ddl_playa.Enabled = (ddl_playa.SelectedIndex > 0); ddl_posicion.Enabled = (ddl_posicion.SelectedIndex > 0); } if (sender != null) { ddl_zona_SelectedIndexChanged(null, null); } } }