Пример #1
0
 internal static void Create(Models.Transaction Transaction)
 {
     database.NewExecute(
         "INSERT INTO transaction (`GUID`,`Type`,`userId`) VALUES (@Guid,@Type,@uId)",
         new SQL().ParameterRange("@Guid", "@Type", "@uId"),
         new SQL().ValuesRange(Transaction.TransationGUId, Transaction.TransationType, API.Staff.Id)
         );
 }
Пример #2
0
 public static Models.Transaction FormatTransaction(MySqlDataReader reader)
 {
     Models.Transaction Transaction = null;
     while (reader.Read())
     {
         Transaction = new Models.Transaction
         {
             TransactionId  = reader.GetString("Id"),
             TransationDate = reader["date_stamp"].ToString(),
             TransationGUId = reader["GUID"].ToString(),
             TransationType = reader.GetInt32("Type")
         };
     }
     reader.Close();
     return(Transaction);
 }