Example #1
0
    protected void ObtenerShorteck(bool forzarBD)
    {
        if (ViewState["lista"] == null || forzarBD)
        {
            ShorteckBC s = new ShorteckBC();
            ViewState["lista"] = s.ObtenerTodos();
            ViewState.Remove("filtrados");
        }
        DataView dw = new DataView((DataTable)ViewState["lista"]);

        if (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();
    }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         TransportistaBC tran = new TransportistaBC();
         TrailerTipoBC   tipo = new TrailerTipoBC();
         ShorteckBC      s    = new ShorteckBC();
         //rlcli.DataSource = dt;
         //rlcli.DataTextField = "DESCRIPCION";
         //rlcli.DataValueField = "ID";
         //rlcli.DataBind();
         //utils.CargaCheck(this.chklst_editCaracteristicas, "ID", "DESCRIPCION", catt.obtenerTodo());
         d.Site_Todos(ddl_buscarSite);
         ddl_buscarSite_IndexChanged(null, null);
         d.Transportista_Todos(ddl_editTran);
         //utils.CargaDrop(ddl_editTran, "ID", "NOMBRE", tran.ObtenerTodos());
         utils.CargaDrop(ddl_editTipo, "ID", "DESCRIPCION", tipo.obtenerTodo());
         utils.CargaDrop(ddl_buscarTransportista, "ID", "NOMBRE", tran.ObtenerTodos());
         utils.CargaDrop(ddl_buscarTipo, "ID", "DESCRIPCION", tipo.obtenerTodo());
         utils.CargaDrop(ddTipoBloqueo, "ID", "NOMBRE", tran.ObtenerMotivoBloqueo("1"));
         utils.CargaDrop(ddl_editShorteck, "SHOR_ID", "SHOR_DESC", s.ObtenerTodos());
         ltl_contenidoCaract.Text = crearContenido();
         ObtenerTrailer(true);
     }
 }
Example #3
0
    public void btnModalEliminar_Click(object sender, EventArgs e)
    {
        ShorteckBC s = new ShorteckBC();

        if (s.Eliminar(hf_idShorteck.Value))
        {
            ObtenerShorteck(true);
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", "alert('Todo OK');", true);
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cerrar", "cerrarModal('modalConfirmacion');", true);
        }
        else
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", "alert('Error');", true);
        }
    }
Example #4
0
    private void CargaDrops()
    {
        TransportistaBC tran = new TransportistaBC();
        TrailerTipoBC   tipo = new TrailerTipoBC();
        ShorteckBC      s    = new ShorteckBC();
        DataTable       dt;

        dt = tran.ObtenerTodos();
        utils.CargaDrop(this.ddl_editTran, "ID", "NOMBRE", dt);
        utils.CargaDrop(this.ddl_buscarTransportista, "ID", "NOMBRE", dt);
        dt = tipo.obtenerTodo();
        utils.CargaDrop(this.ddl_editTipo, "ID", "DESCRIPCION", dt);
        utils.CargaDrop(this.ddl_buscarTipo, "ID", "DESCRIPCION", dt);
        utils.CargaDrop(this.ddTipoBloqueo, "ID", "NOMBRE", tran.ObtenerMotivoBloqueo("1"));
        utils.CargaDrop(this.ddl_editShorteck, "SHOR_ID", "SHOR_DESC", s.ObtenerTodos());
    }
Example #5
0
    private void CargaDrops()
    {
        YMS_ZONA_BC   yms = new YMS_ZONA_BC();
        CaractCargaBC car = new CaractCargaBC();
        ShorteckBC    sh  = new ShorteckBC();
        DataTable     dt;

        dt = yms.ObteneSites(usuario.ID);
        utils.CargaDropNormal(dropsite, "ID", "NOMBRE", dt);
        dt = car.obtenerXTipo(30);
        utils.CargaDrop(ddl_solTemp, "ID", "DESCRIPCION", dt);
        dt = car.obtenerXTipo(0);
        utils.CargaDrop(ddl_largoMax, "ID", "DESCRIPCION", dt);
        dt = sh.ObtenerTodos();
        utils.CargaDrop(ddl_idShortek, "SHOR_ID", "SHOR_DESC", dt);
        utils.CargaDrop(ddl_id_shortrec2, "SHOR_ID", "SHOR_DESC", dt);
    }
Example #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CargaTipoBC ct  = new CargaTipoBC();
         ShorteckBC  sh  = new ShorteckBC();
         YMS_ZONA_BC yms = new YMS_ZONA_BC();
         DataTable   ds  = yms.ObteneSites(((UsuarioBC)Session["Usuario"]).ID);
         utils.CargaDropNormal(this.DDL_SITE, "ID", "NOMBRE", ds);
         TrailerEstadoBC estadobc = new TrailerEstadoBC();
         CaractCargaBC   car      = new CaractCargaBC();
         utils.CargaDropTodos(DDL_disponibilidad, "ID", "NOMBRE", estadobc.ObtenerTodosSTOCK());
         utils.CargaDropTodos(this.ddl_capacidad, "ID", "DESCRIPCION", car.obtenerXTipo(0));
         utils.CargaDropTodos(this.ddl_tipocarga, "ID", "DESCRIPCION", ct.obtenerTodo());
         utils.CargaDropTodos(this.ddl_shortec, "SHOR_ID", "SHOR_DESC", sh.ObtenerTodos());
     }
 }
Example #7
0
    public void btn_guardar_Click(object sender, EventArgs e)
    {
        ShorteckBC s = new ShorteckBC();

        s.ID          = txt_editCodigo.Text;
        s.DESCRIPCION = txt_editDescripcion.Text;
        if (s.AgregarModificar())
        {
            ObtenerShorteck(true);
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", "alert('Todo OK');", true);
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "cerrar", "cerrarModal('modalShorteck');", true);
        }
        else
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", "alert('Error');", true);
        }
    }
Example #8
0
 public void gv_listar_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "EDITAR")
     {
         hf_idShorteck.Value = e.CommandArgument.ToString();
         ShorteckBC s = new ShorteckBC();
         s = s.ObtenerXId(hf_idShorteck.Value);
         txt_editCodigo.Text      = s.ID;
         txt_editCodigo.Enabled   = false;
         txt_editDescripcion.Text = s.DESCRIPCION;
         ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "modalShorteck();", true);
     }
     if (e.CommandName == "ELIMINAR")
     {
         hf_idShorteck.Value = e.CommandArgument.ToString();
         ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "asdf", "modalConfirmacion();", true);
     }
 }
Example #9
0
 public bool AgregarModificar(ShorteckBC s)
 {
     return(tran.Shorteck_AgregarModificar(s));
 }
Example #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["usuario"] == null)
        {
            this.Response.Redirect("~/InicioQYMS2.aspx");
        }
        this.usuario = (UsuarioBC)this.Session["usuario"];
        SolicitudBC   sol = new SolicitudBC();
        CaractCargaBC car = new CaractCargaBC();
        ShorteckBC    sh  = new ShorteckBC();

        if (!this.IsPostBack)
        {
            this.volver.Visible   = false;
            sol.ID_TIPO           = 1;
            sol.FECHA_CREACION    = DateTime.Now;
            this.txt_solHora.Text = DateTime.Now.AddMinutes(63).ToShortTimeString();
            YMS_ZONA_BC yms = new YMS_ZONA_BC();
            utils.CargaDropNormal(this.dropsite, "ID", "NOMBRE", yms.ObteneSites(this.usuario.ID));
            utils.CargaDrop(this.ddl_solTemp, "ID", "DESCRIPCION", car.obtenerXTipo(30));
            utils.CargaDrop(this.ddl_largoMax, "ID", "DESCRIPCION", car.obtenerXTipo(0));
            //  utils.CargaDropTodos(this.ddl_idShortek, "SHOR_ID", "SHOR_DESC", sh.ObtenerTodos());
            ddl_idShortek.DataSource    = sh.ObtenerTodos();
            ddl_idShortek.DataTextField = "SHOR_DESC";

            ddl_idShortek.DataValueField = "SHOR_ID";
            ddl_idShortek.DataBind();
            ddl_idShortek.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Seleccione", "0"));
            ddl_idShortek.SelectedValue = "0";

            ddl_id_shortrec2.DataSource    = sh.ObtenerTodos();
            ddl_id_shortrec2.DataTextField = "SHOR_DESC";

            ddl_id_shortrec2.DataValueField = "SHOR_ID";
            ddl_id_shortrec2.DataBind();
            ddl_id_shortrec2.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Seleccione", "0"));
            ddl_id_shortrec2.SelectedValue = "0";



            this.txt_solFecha.Text = DateTime.Now.AddMinutes(63).ToShortDateString();
            this.ddl_solTemp.ClearSelection();
            this.ddl_largoMax.ClearSelection();
            this.LimpiarLocales();
            if (this.Request.Params["type"] != null)
            {
                TrailerBC     trailer = new TrailerBC();
                CaractCargaBC cc      = new CaractCargaBC();
                this.hf_soliId.Value          = this.Request.Params["id"].ToString();
                this.btn_limpiarDatos.Visible = false;
                this.txt_solNumero.Text       = this.hf_soliId.Value;
                sol = sol.ObtenerXId(int.Parse(this.hf_soliId.Value));
                this.hf_localesSeleccionados.Value = sol.LOCALES;
                this.txt_totalPallets.Text         = sol.Pallets.ToString();
                this.txt_ruta.Text = sol.RUTA;
                this.ddl_idShortek.SelectedValue = sol.ID_SHORTECK;
                this.hf_timeStamp.Value          = sol.TIMESTAMP.ToString();
                this.volver.Visible = true;
                string[] caract = sol.CARACTERISTICAS.Split(",".ToCharArray());
                foreach (string c in caract)
                {
                    if (c != "")
                    {
                        cc = cc.obtenerSeleccionado(int.Parse(c));
                        switch (cc.CODIGO)
                        {
                        case "CCF":
                            this.chk_solFrio.Checked = true;
                            break;

                        case "CCS":
                            this.chk_solSeco.Checked = true;
                            break;

                        case "CCC":
                            this.chk_solCongelado.Checked = true;
                            break;

                        case "CCMF":
                            this.chk_solMultifrio.Checked = true;
                            break;

                        case "CCCP":
                            this.chk_plancha.Checked = true;
                            break;

                        case "CCWAY":
                            this.chk_solWays.Checked = true;
                            break;
                        }
                    }
                }
                this.chk_solMultifrio.Enabled = false;
                this.chk_solCongelado.Enabled = false;
                this.chk_solSeco.Enabled      = false;
                this.chk_solFrio.Enabled      = false;
                this.dropsite.Enabled         = false;
                this.txt_solFecha.Enabled     = false;
                this.txt_solHora.Enabled      = false;
                SolicitudAndenesBC sa = new SolicitudAndenesBC();
                sa.ObtenerTodo(sol.SOLI_ID);
                this.ObtenerLocalesSolicitud(true);
                this.stringCaractSolicitud();
                this.carga_playas();
                if (sol.TETR_ID != 0)
                {
                    this.DDL_TEMP.SelectedValue = sol.TETR_ID.ToString();
                }
                trailer = trailer.obtenerXID(sol.ID_TRAILER);
                this.txt_trailerPatente.Text = trailer.PLACA;
                this.calcula_solicitud(null, null);
                this.btn_buscarTrailer_Click(null, null);

                if (this.hf_traiId.Value != "0" && sol.SOES_ID > 101)
                {
                    this.visiblasignamanual.Enabled = false;
                }
            }
        }
        this.visiblasignamanual.Visible = false;
    }