示例#1
0
 private void f_Load_Tree_UserID()
 {
     try
     {
         string aexp = "";
         if (txtTimuser.Text.Trim() != lan.Change_language_MessageText("Tìm kiếm") && txtTimuser.Text.Trim() != "")
         {
             aexp = " upper(hoten) like '%" + txtTimuser.Text.Trim().ToUpper() + "%'";
         }
         if (aexp != "")
         {
             aexp = " where " + aexp;
         }
         string sql = "select to_char(id) as ma,trim(hoten)||'                    ( '||userid||' )' as ten from medibv.v_dlogin " + aexp + " order by hoten";
         m_v.f_Load_Tree(tree_User, m_v.get_data(sql));
         for (int i = 0; i < tree_User.Nodes.Count; i++)
         {
             if (tree_User.Nodes[i].Tag.ToString() == m_userid)
             {
                 tree_User.Nodes[i].Checked = true;
                 break;
             }
         }
     }
     catch
     {
     }
 }