public static DataTable Query <T>(int id) { //select * from admin String sql = $"select * from {typeof(T).Name} where {typeof(T).GetProperty(id.ToString())} = '{id}'"; return(Sqlhelp.Query(sql, null)); }
public static void Query <T>(string name) { //select * from admin String sql = $"select * from {typeof(T).Name} where {typeof(T).GetProperty(name)} like '{name}'"; Sqlhelp.Query(sql); }
public static DataTable Query <T>() { //select * from admin String sql = $"select * from {typeof(T).Name}"; return(Sqlhelp.Query(sql, null)); }
public static void Query <T>(bool l) { string sql = ""; //select * from admin if (l) { sql = $"select * from {typeof(T).Name} order by updatetime"; Sqlhelp.Query(sql); } else { sql = $"select * from {typeof(T).Name} order by updatetime desc"; } Sqlhelp.Query(sql); }