Ejemplo n.º 1
0
        private void isiListBox()
        {
            LbxUsername.Items.Clear();

            cDatabase db = new cDatabase();
            cQuery    qr = new cQuery();

            string queryUse = string.Empty;

            if (rbBiroUmum.Checked == true)
            {
                queryUse = qr.qSelectUserOpBu();
            }
            else if (rbAkademik.Checked == true)
            {
                queryUse = qr.qSelectUserOpAkademik();
            }

            DataTable dtUser = db.selectData(queryUse, '1');


            if (dtUser.Rows.Count != 0)
            {
                foreach (DataRow row in dtUser.Rows)
                {
                    LbxUsername.Items.Add(row["username"]);
                }
            }
            dtUser.Clear();
            dtUser.Dispose();
        }