/// <summary> /// Inserts a record into a table using Cmd /// </summary> /// <param name="Cmd">The Sql Command object to execute.</param> /// <param name="PaymentId">The payment id to which to assign the record.</param> /// <param name="Record">The record to insert.</param> private void Insert_Record(SqlCommand Cmd, int PaymentId, SimpleSerializer Record) { if (Record == null) { throw new Exception("Missing data for: " + Cmd.CommandText); } Record.CopyTo(Cmd); Cmd.Parameters["@PaymentId"].Value = PaymentId; Cmd.ExecuteNonQuery(); }