示例#1
0
    protected void drop_SelectedIndexChanged(object sender, EventArgs e)
    {
        SiteBC s = new SiteBC();

        s             = s.ObtenerXId(Convert.ToInt32(dropsite.SelectedValue));
        lbl_site.Text = "CD " + s.DESCRIPCION;
        if (!string.IsNullOrEmpty(txt_placaTrailer.Text))
        {
            this.btnBuscarTrailer_Click(null, null);
        }
    }
示例#2
0
 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();
         }
     }
 }
示例#3
0
    protected void drop_SelectedIndexChanged(object sender, EventArgs e)
    {
        SiteBC s = new SiteBC();

        s             = s.ObtenerXId(Convert.ToInt32(dropsite.SelectedValue));
        lbl_site.Text = "CD " + s.DESCRIPCION;
        //YMS_ZONA_BC yms = new YMS_ZONA_BC();
        string tipo_zona;

        if (this.rb_ingresoCargado.Checked == true)
        {
            tipo_zona = "200";
        }
        else
        {
            tipo_zona = "100";
        }

        if (txt_placaTrailer.Text != "" && txt_placaTrailer.Text != null)
        {
            this.btnBuscarTrailer_Click(null, null);
        }
    }