Exemple #1
0
        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);
        }
Exemple #2
0
 public void Delete(entities.Cashbox cashbox)
 {
     cashboxes.Remove(cashbox);
 }
Exemple #3
0
 public void Add(entities.Cashbox cashbox)
 {
     cashboxes.Add(cashbox);
 }