public bool CommitTrans(Dictionary <string, string> Params) { Query += QueryMaker.CommitTransQuery(); bool result = ExecuteQuery(Query, Params); Query = string.Empty; return(result); }
public bool CommitTrans() { Query += QueryMaker.CommitTransQuery(); bool result = ExecuteQuery(Query); Query = string.Empty; return(result); }
public static bool ExecuteTransactionQuery(string query, Dictionary <string, string> Params = null) { query = $"{QueryMaker.BeginTransQuery()} {query} {QueryMaker.CommitTransQuery()}"; using (SqlConnection Connection = new SqlConnection(ConnectionString)) { Connection.Open(); SqlCommand cmd = GetSqlCommandWithParams(query, Connection, Params); int rowseffected = cmd.ExecuteNonQuery(); Connection.Close(); return(true); } }