Esempio n. 1
0
    void bind_wp4_no()
    {
        DataSet Ds = new DataSet();

        try
        {
            string         com  = "SELECT wp4_batch_name FROM aim_wp4 group by wp4_batch_name";
            SqlDataAdapter adpt = new SqlDataAdapter(com, con);
            DataTable      dt   = new DataTable();
            if (dt != null)
            {
                adpt.Fill(dt);
                DD_STS_ANGGO.DataSource     = dt;
                DD_STS_ANGGO.DataTextField  = "wp4_batch_name";
                DD_STS_ANGGO.DataValueField = "wp4_batch_name";
                DD_STS_ANGGO.DataBind();
                DD_STS_ANGGO.Items.Insert(0, new ListItem("--- PILIH ---", ""));
            }
            else
            {
                DD_STS_ANGGO.Items.Insert(0, new ListItem("--- PILIH ---", ""));
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Esempio n. 2
0
    void sts_anggota()
    {
        DataSet Ds = new DataSet();

        try
        {
            string         com  = "SELECT Member_Description,Membership_Code FROM status_kelulusan where Membership_Code NOT IN ('DN') order by Member_Description asc";
            SqlDataAdapter adpt = new SqlDataAdapter(com, con);
            DataTable      dt   = new DataTable();
            adpt.Fill(dt);
            DD_STS_ANGGO.DataSource     = dt;
            DD_STS_ANGGO.DataTextField  = "Member_Description";
            DD_STS_ANGGO.DataValueField = "Membership_Code";
            DD_STS_ANGGO.DataBind();
            DD_STS_ANGGO.Items.Insert(0, new ListItem("--- PILIH ---", ""));
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }