Beispiel #1
0
        public void Save(Entry entity)
        {
            SqlServerCeManager database = new SqlServerCeManager();
            string             querry   = $"insert into Entries (Name, Value, EntryGroup, Editable, Type) " +
                                          $"values('{entity.Name}', {entity.Value.ToString("F2", CultureInfo.InvariantCulture)}, " +
                                          $"'{entity.Group}', '{entity.Editable}', {(int)entity.EntryType})";

            database.ExecuteQuerryAsync(querry);
        }
Beispiel #2
0
        public void Update(Entry entity)
        {
            SqlServerCeManager database = new SqlServerCeManager();
            string             querry   = $"update Entries set Name = '{entity.Name}', " +
                                          $"Value = {entity.Value.ToString("F2", CultureInfo.InvariantCulture)}, " +
                                          $"EntryGroup = '{entity.Group}', Editable = '{entity.Editable}', " +
                                          $"Type = {(int)entity.EntryType} where Id = {entity.Id}";

            database.ExecuteQuerryAsync(querry);
        }
Beispiel #3
0
        public void Delete(Entry entity)
        {
            SqlServerCeManager database = new SqlServerCeManager();

            database.ExecuteQuerryAsync($"delete from Entries where Id = {entity.Id}");
        }