Пример #1
0
        public bool CommitTrans(Dictionary <string, string> Params)
        {
            Query += QueryMaker.CommitTransQuery();
            bool result = ExecuteQuery(Query, Params);

            Query = string.Empty;
            return(result);
        }
Пример #2
0
        public bool CommitTrans()
        {
            Query += QueryMaker.CommitTransQuery();
            bool result = ExecuteQuery(Query);

            Query = string.Empty;
            return(result);
        }
Пример #3
0
 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);
     }
 }