Exemple #1
0
        private void txtsearch_TextChanged(object sender, EventArgs e)
        {
            try
            {
                dDanhMuc.Rows.Clear();
                CDanhMucOracle ora_danhmuc = new CDanhMucOracle();
                dt_dmbd = ora_danhmuc.get_danhmucbd_bhyt(txtsearch.Text);
                foreach (DataRow dr in dt_dmbd.Rows)
                {
                    dDanhMuc.Rows.Add(dr.ItemArray);
                }
                //  dDanhMuc.DataSource = dt_dmbd;
            }
            catch { }

            //try
            //{
            //    foreach (DataGridViewRow dr in dDanhMuc.Rows)
            //    {
            //        if (dr.Cells["ten"].Value.ToString().ToLower().IndexOf(txtsearch.Text.ToLower()) > 0)
            //            dr.Visible = true;
            //        else
            //            dr.Visible = false;
            //    }
            //}
            //catch { }
        }
Exemple #2
0
 private void f_loadDanhSach()
 {
     try
     {
         dDanhMuc.Rows.Clear();
         CDanhMucOracle ora_danhmuc = new CDanhMucOracle();
         dt_dmbd = ora_danhmuc.get_danhmucbd_bhyt("");
         foreach (DataRow dr in dt_dmbd.Rows)
         {
             dDanhMuc.Rows.Add(dr.ItemArray);
         }
         //  dDanhMuc.DataSource = dt_dmbd;
     }
     catch { }
 }