Exemplo n.º 1
0
 public DictionaryEntry[] GetDictionaryEntries(int type, int state)
 {
     DBDictionaryCollection dbDictionary = new DBDictionaryCollection(dataProvider);
     dbDictionary.Connection = connection;
     List<DictionaryEntry> list = dbDictionary.Load(type, state);
     if (list.Count > 0)
     {
         return list.ToArray();
     }
     return null;
 }
Exemplo n.º 2
0
 public void CollectionTest()
 {
     InsertTest();
     DBDictionary dbDictionary = new DBDictionary();
     dbDictionary.Connection = GetConnection();
     DictionaryEntry entry = new DictionaryEntry();
     entry.Active = true;
     entry.Guid = "69E68ADF-A083-4889-BC11-8353B8CA5EAD";
     entry.Name = "Test";
     entry.Type = MWRCommonTypes.Enum.ObjectType.State;
     dbDictionary.Save(entry);
     DBDictionaryCollection collection = new DBDictionaryCollection(new SqlDataProvider());
     collection.Connection = GetConnection();
     collection.Load();
     Assert.IsTrue(collection.List.Count == 2);
     dbDictionary.Delete();
     dbDictionary.Delete("AEF29AAA-0F23-4ba3-AA10-BAE05B3E4503");
 }
Exemplo n.º 3
0
 public List<DictionaryEntry> GetActiveTasks()
 {
     DBDictionaryCollection dbDictionary = new DBDictionaryCollection(dataProvider);
     dbDictionary.Connection = connection;
     return dbDictionary.LoadActiveTasks();
 }