public bool FillCashboxes(repositories.Cashbox cashboxRepository) { SQLiteCommand command = new SQLiteCommand("SELECT * FROM cashbox", db.connection); SQLiteDataReader reader = command.ExecuteReader(); if (reader.HasRows) { while (reader.Read()) { entities.Cashbox cashbox = new entities.Cashbox(reader.GetInt32(0), reader.GetString(1)); cashboxRepository.Add(cashbox); } } reader.Close(); return(true); }
public void Delete(entities.Cashbox cashbox) { cashboxes.Remove(cashbox); }
public void Add(entities.Cashbox cashbox) { cashboxes.Add(cashbox); }