Ejemplo n.º 1
0
 public static DataTable Query(Hashtable queryItems)
 {
     string where = SQLString.GetConditionClause(queryItems);
     string sql = "Select * From [Departmentmr]" + where;
     DataBase db = new DataBase();
     return db.GetDataTable(sql);
 }
Ejemplo n.º 2
0
        /// 查询用户        
        public static DataTable QueryUsers(Hashtable queryItems)
        {
            string where = SQLString.GetConditionClause(queryItems);
            string sql = "Select * From [Usersmr],[Departmentmr],[Rolemr] " + where;

            if (where == "")
                sql += " Where";
            else
                sql += " And";

            sql += " [Usersmr].DepartmentId=[Departmentmr].DepartmentId"
                + " And [Usersmr].RoleId=[Rolemr].RoleId";

            DataBase DB = new DataBase();
            return DB.GetDataTable(sql);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// ���ݲ�ѯ������ϣ��,��ѯ����
 /// </summary>
 /// <param name="queryItems">��ѯ������ϣ��</param>
 /// <returns>��ѯ�������DataTable</returns>
 public static DataTable Query(Hashtable queryItems)
 {
     string where = SQLString.GetConditionClause(queryItems);
     string sql = "Select top 2 * From [Rolemr] order by RoleId" + where;
     DataBase db = new DataBase();
     return db.GetDataTable(sql);
 }