예제 #1
0
        private void BTNTIM_Click(object sender, EventArgs e)
        {
            if (radchuadong.Checked == false && radong.Checked == false)
            {
                progressBar1.Visible = false;
                MessageBoxEx.Show("Bạn chưa chọn lĩnh vực tìm kiếm!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            if (radong.Checked == true)
            {
                progressBar1.Visible = true;
                for (int i = 0; i < 100; i++)
                {
                    progressBar1.Value++;
                    System.Threading.Thread.Sleep(20);
                    progressBar1.Update();
                }
                frmDoanphi       DP     = new frmDoanphi();
                string           select = " Select * From DOANPHI where SOTIEN =" + ktso() + "";
                OleDbDataAdapter da     = new OleDbDataAdapter(select, objConnect);
                DataSet          ds     = new DataSet();
                da.Fill(ds, "ds");
                DGTIMKIEM.DataSource = ds;
                DGTIMKIEM.DataMember = "ds";
                MessageBoxEx.Show("Đã tìm thấy " + demgiatri() + " đoàn viên!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);

                progressBar1.Value   = 0;
                progressBar1.Visible = false;
            }

            else
            {
                progressBar1.Visible = true;
                for (int i = 0; i < 100; i++)
                {
                    progressBar1.Value++;
                    System.Threading.Thread.Sleep(20);
                    progressBar1.Update();
                }
                string           select = " Select * From DOANPHI where SOTIEN =0";
                OleDbDataAdapter da     = new OleDbDataAdapter(select, objConnect);
                DataSet          ds     = new DataSet();
                da.Fill(ds, "ds");
                DGTIMKIEM.DataSource = ds;
                DGTIMKIEM.DataMember = "ds";
                MessageBoxEx.Show("Đã tìm thấy " + demgiatri() + " đoàn viên!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);

                progressBar1.Value   = 0;
                progressBar1.Visible = false;
            }
        }
        private void buttonItem5_Click(object sender, EventArgs e)
        {
            frmDoanphi dp = new frmDoanphi();

            dp.Show();
        }
        private void quảnLýĐoànPhíToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDoanphi DP = new frmDoanphi();

            DP.Show();
        }