public static void ExecNonQuery(this IQueryArgs args, string Command) { if (args.GetType() == typeof(Query.QueryArgs)) { using (Query sql = new Query(args as Query.QueryArgs)) sql.ExecNonQuery(Command); } //else if (args.GetType() == typeof(QueryMy.QueryArgs)) // using (QueryMy sql = new QueryMy(args as QueryMy.QueryArgs)) sql.ExecNonQuery(Command); }
public static void ExecNonQuery(this IQueryArgs args, string Command, string[] Parameters, object[] values, CommandType type = CommandType.StoredProcedure) { if (args.GetType() == typeof(Query.QueryArgs)) { using (Query sql = new Query(args as Query.QueryArgs)) sql.ExecNonQuery(Command, Parameters, values, type); } //else if (args.GetType() == typeof(QueryMy.QueryArgs)) // using (QueryMy sql = new QueryMy(args as QueryMy.QueryArgs)) sql.ExecNonQuery(Command, Parameters, values, type); }
public static void TestConnect(this IQueryArgs args) { if (args.GetType() == typeof(Query.QueryArgs)) { using (Query sql = new Query(args as Query.QueryArgs)) { } } //else if (args.GetType() == typeof(QueryMy.QueryArgs)) // using (QueryMy sql = new QueryMy(args as QueryMy.QueryArgs)) { } }
public static DataTable TableQuery(this IQueryArgs args, string Command) { if (args.GetType() == typeof(Query.QueryArgs)) { using (Query sql = new Query(args as Query.QueryArgs)) return(sql.TableQuery(Command)); } else { return(null); } }
public static T ExecScalar <T>(this IQueryArgs args, string Command, string[] Parameters, object[] values, CommandType type = CommandType.StoredProcedure) where T : class { if (args.GetType() == typeof(Query.QueryArgs)) { using (Query sql = new Query(args as Query.QueryArgs)) return(sql.ExecScalar <T>(Command, Parameters, values, type)); } //else if (args.GetType() == typeof(QueryMy.QueryArgs)) // using (QueryMy sql = new QueryMy(args as QueryMy.QueryArgs)) return sql.ExecScalar<T>(Command, Parameters, values, type); else { return(null); } }
public static T ExecScalar <T>(this IQueryArgs args, string Command, params object[] values) where T : class { if (args.GetType() == typeof(Query.QueryArgs)) { using (Query sql = new Query(args as Query.QueryArgs)) return(sql.ExecScalar <T>(Command, values)); } //else if (args.GetType() == typeof(QueryMy.QueryArgs)) // using (QueryMy sql = new QueryMy(args as QueryMy.QueryArgs)) return sql.ExecScalar<T>(Command, values); else { return(null); } }
public static DataSet ExecQuery(this IQueryArgs args, string Command) { if (args.GetType() == typeof(Query.QueryArgs)) { using (Query sql = new Query(args as Query.QueryArgs)) return(sql.ExecQuery(Command)); } //else if (args.GetType() == typeof(QueryMy.QueryArgs)) // using (QueryMy sql = new QueryMy(args as QueryMy.QueryArgs)) return sql.ExecQuery(Command); else { return(null); } }