Exemplo n.º 1
0
 private void lbxRazon()
 {
     if (m_frmAction == frmAction.Read)
     {
         if (ddlTHBelong.SelectedValue == "2" /*=No*/)
         {
             string    selectedValuesString = "";
             NewSource NS   = new NewSource();
             DataTable Dref = new DataTable();
             Dref = NS.getRef("SPR_Ref_RazonTH", m_pk_perfil);
             if (Dref.Rows.Count > 0)
             {
                 foreach (DataRow r in Dref.Rows)
                 {
                     selectedValuesString += r[1].ToString() + ", ";
                 }
                 selectedValuesString = selectedValuesString.Substring(0, selectedValuesString.Length - 2);
                 Dref = null;
             }
             else
             {
                 selectedValuesString = "No hay valores seleccionados";
             }
             NS = null;
             divRazon.Visible = false;
             lblRazon.Text    = selectedValuesString;
         }
         else
         {
             divRazon.Visible    = false;
             divLblRazon.Visible = false;
         }
     }
     else
     {
         NewSource NS = new NewSource();
         DataTable Dt = new DataTable();
         Dt = NS.getAll("SPR_DROP_RazonTH");
         this.lbxRazonSeleccion.DataSource     = Dt;
         this.lbxRazonSeleccion.DataValueField = "PK_Razon";
         this.lbxRazonSeleccion.DataTextField  = "DE_Razon";
         this.lbxRazonSeleccion.DataBind();
         DataTable Dref = new DataTable();
         Dref = NS.getRef("SPR_Ref_RazonTH", m_pk_perfil);
         if (Dref.Rows.Count > 0)
         {
             foreach (DataRow r in Dref.Rows)
             {
                 System.Web.UI.WebControls.ListItem li = new ListItem(r[1].ToString(), r[0].ToString());
                 this.lbxRazonSeleccionado.Items.Add(li);
                 this.lbxRazonSeleccion.Items.Remove(li);
             }
             Dref = null;
         }
         Dt = null;
         NS = null;
         divLblRazon.Visible = false;
     }
 }
        private void ddlCategoriasDeCentrosPrivadosALL()
        {
            NewSource NS = new NewSource();
            DataTable Dt = new DataTable();

            Dt = NS.getAll("SPR_DROP_CategoriasCentrosPrivados");
            this.ddlCategoriasDeCentrosPrivados.DataSource     = Dt;
            this.ddlCategoriasDeCentrosPrivados.DataValueField = "PK_CategoriaCentroPrivado";
            this.ddlCategoriasDeCentrosPrivados.DataTextField  = "DE_CategoriaCentroPrivado";
            this.ddlCategoriasDeCentrosPrivados.DataBind();
            Dt = null;
            NS = null;
        }
Exemplo n.º 3
0
        private void ddlTipoDeAdmisionAll()
        {
            NewSource NS = new NewSource();
            DataTable Dt = new DataTable();

            Dt = NS.getAll("SPR_DROP_TipoAdmision");
            this.ddlTipoDeAdmision.DataSource     = Dt;
            this.ddlTipoDeAdmision.DataValueField = "PK_TipoAdmision";
            this.ddlTipoDeAdmision.DataTextField  = "DE_TipoAdmision";
            this.ddlTipoDeAdmision.DataBind();
            Dt = null;
            NS = null;
        }
Exemplo n.º 4
0
        private void ddlTipoDeAdmisionAll()
        {
            NewSource NS = new NewSource();
            DataTable Dt = new DataTable();

            Dt = NS.getAll("SPR_DROP_TipoAdmision");
            this.ddlTipoDeAdmision.DataSource     = Dt;
            this.ddlTipoDeAdmision.DataValueField = "PK_TipoAdmision";
            this.ddlTipoDeAdmision.DataTextField  = "DE_TipoAdmision";
            this.ddlTipoDeAdmision.DataBind();

            if (UsaTipoDeAdmision(m_PK_Programa))
            {
                this.ddlTipoDeAdmision.Items.RemoveAt(6);
            }

            Dt = null;
            NS = null;
        }
Exemplo n.º 5
0
        private void ddlMilitarALL()
        {
            NewSource NS = new NewSource();
            DataTable Dt = new DataTable();

            Dt = NS.getAll("SPR_DROP_Militar");
            this.ddlMilitar.DataSource     = Dt;
            this.ddlMilitar.DataValueField = "PK_Militar";
            this.ddlMilitar.DataTextField  = "DE_Militar";
            try
            {
                this.ddlMilitar.DataBind();
            }
            catch
            {
                this.ddlMilitar.SelectedValue = "";
            }
            Dt = null;
            NS = null;
        }
Exemplo n.º 6
0
        private void ddlGeneroAll()
        {
            NewSource NS = new NewSource();
            DataTable Dt = new DataTable();

            Dt = NS.getAll("SPR_DROP_Genero");
            this.ddlGenero.DataSource     = Dt;
            this.ddlGenero.DataValueField = "PK_Genero";
            this.ddlGenero.DataTextField  = "DE_Genero";
            this.ddlGenero.ClearSelection();
            try
            {
                this.ddlGenero.DataBind();
            }
            catch
            {
                this.ddlGenero.SelectedValue = "";
            }
            Dt = null;
            NS = null;
        }
Exemplo n.º 7
0
    private void ddlEtapa()
    {
        NewSource NS = new NewSource();
        DataTable Dt = new DataTable();

        Dt = NS.getAll("SPR_DROP_EtapaTH");
        this.ddlTHEtapa.DataSource     = Dt;
        this.ddlTHEtapa.DataValueField = "PK_Etapa";
        this.ddlTHEtapa.DataTextField  = "DE_Etapa";
        try
        {
            this.ddlTHEtapa.DataBind();
            ListItem li = new ListItem("", "0");
            this.ddlTHEtapa.Items.Insert(0, li);
        }
        catch (Exception ex)
        {
            Trace.Write("DdlFrecuenciaBotellas()::" + ex.Message);
            throw ex;
        }
        Dt = null;
        NS = null;
    }