Пример #1
0
    protected void tipo_carga_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.rb_posAuto.Checked   = false;
        this.rb_posManual.Checked = true;
        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 (ddl_tipo_carga.SelectedValue == "0")
        {
            ddl_motivo.Items.Clear();
            ddl_motivo.Enabled = false;
        }
        else
        {
            utils.CargaDrop(this.ddl_motivo, "ID", "DESCRIPCION", yms.obtenerMotivoTipoCarga(this.ddl_tipo_carga.SelectedValue, null));
            ddl_motivo.Enabled = (ddl_motivo.Items.Count > 1);
        }

        utils.CargaDrop(ddl_zona, "ID", "DESCRIPCION", yms.ObtenerZonasTipoCarga(Convert.ToInt32(this.dropsite.SelectedValue), "", tipo_zona, Convert.ToInt32(this.ddl_tipo_carga.SelectedValue), 200));
        ddl_zona_SelectedIndexChanged(null, null);
        Pnl_guia.Visible = true;
        PNL_CITA.Visible = true;
    }
Пример #2
0
    protected void chk_ingresoCargado_CheckedChanged(object sender, EventArgs e)
    {
        this.ddl_tipo_carga.Enabled = false;
        this.ddl_motivo.Enabled     = false;
        if (!String.IsNullOrEmpty(this.hf_idTrailer.Value) && this.hf_idTrailer.Value != "0")
        {
            //    this.drop_SelectedIndexChanged(null, null);
            YMS_ZONA_BC yms = new YMS_ZONA_BC();
            string      tipo_zona;
            if (this.rb_ingresoCargado.Checked == true)
            {
                tipo_zona = "200";
                this.ddl_tipo_carga.Enabled = true;
            }
            else
            {
                tipo_zona = "100";
                ddl_tipo_carga.Enabled = false;
            }
            tipo_carga_SelectedIndexChanged(null, null);
            ddl_zona.Enabled = true;

            utils.CargaDrop(this.ddl_zona, "ID", "DESCRIPCION", yms.ObtenerZonasTipoCarga(Convert.ToInt32(this.dropsite.SelectedValue), "", tipo_zona, Convert.ToInt32(this.ddl_tipo_carga.SelectedValue), 200));

            ddl_zona_SelectedIndexChanged(null, null);
            if (rb_ingresoCargado.Checked)
            {
                txt_tracto.Enabled          = true;
                ddl_proveedor.Enabled       = true;
                txt_doc.Enabled             = true;
                txt_idSello.Enabled         = true;
                txt_conductorRut.Enabled    = true;
                txt_conductorNombre.Enabled = true;
                txt_acomRut.Enabled         = true;
            }
            if (rb_ingresoVacio.Checked)
            {
                txt_tracto.Enabled          = true;
                ddl_proveedor.Enabled       = false;
                txt_doc.Enabled             = false;
                txt_idSello.Enabled         = false;
                txt_conductorRut.Enabled    = true;
                txt_conductorNombre.Enabled = true;
                txt_acomRut.Enabled         = true;
            }
        }

        this.rb_pos_CheckedChanged(null, null);
    }