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, 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); } }
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 void ExecNonQuery(this string query, string[] parameters, object[] values, IQueryArgs args, CommandType type = CommandType.StoredProcedure) { args.ExecNonQuery(query, parameters, values, type); }
public static void ExecNonQuery(this string query, IQueryArgs args) { args.ExecNonQuery(query); }
public static T ExecScalar <T>(this string query, string[] parameters, object[] values, IQueryArgs args, CommandType type = CommandType.StoredProcedure) where T : class { return(args.ExecScalar <T>(query, parameters, values, type)); }
public static DataSet ExecQuery(this string query, IQueryArgs args) { return(args.ExecQuery(query)); }
public QueryFire(IQueryArgs args) { Conn = new SqlConnection(args.GetConnectionString()); this.CancellationToken = new CancellationTokenSource().Token; }
public static object ExecScalar(this string query, IQueryArgs args) { return(args.ExecScalar(query)); }
public static DataTable TableQuery(this string query, IQueryArgs args) { return(args.TableQuery(query)); }
//[Obsolete] //public static DataTable FillTable(this string query, IQueryArgs args) //{ // return query.ExecQuery(args).Tables[0] as DataTable; //} //[Obsolete] //public static DataTable Filltable(this IQueryArgs args, string Command) //{ // return Command.FillTable(args); //} public static SqlConnection Connection(this IQueryArgs args) { return(new SqlConnection(args.GetConnectionString())); }
public Query(IQueryArgs QArgs) { this.mArgs = QArgs as QueryArgs; }
public static T ExecScalar <T>(this string query, IQueryArgs args) where T : class { return(args.ExecScalar <T>(query)); }
public QueryFire(IQueryArgs args, CancellationToken cancellationToken) : this(args) { this.CancellationToken = cancellationToken; }
public ZTable(IQueryArgs args, string tablename, bool UseViewForSelect = true) : this(new SqlConnection((args as Query.QueryArgs).GetConnectionString()), tablename, UseViewForSelect) { }