示例#1
0
文件: GetType.cs 项目: GriHingo/ResDB
        private List<HickoryIT.Shared.Data.Type> all(Connection connection)
        {
            if( allTypes == null )
            {
                allTypes = connection.SelectAllFromType();
            }

            return allTypes;
        }
示例#2
0
        private List<Property> all(Connection connection)
        {
            if (allProperties == null)
            {
                // We cache the categories
                allProperties = connection.SelectAllFromProperty();
            }

            return allProperties;
        }
示例#3
0
        private List<Group> all(Connection connection)
        {
            if (allGroups == null)
            {
                // We cache the categories
                allGroups = connection.SelectAllFromGroup();
            }

            return allGroups;
        }
示例#4
0
        public void ReturnConnection(Connection connection)
        {
            connection.Close();

            lock (connections)
            {
                connections.Enqueue(connection);
                Monitor.Pulse(connections);
            }
        }
示例#5
0
        private List<Category> all(Connection connection)
        {
            if(allCategories==null)
            {
                // We cache the categories
                allCategories = connection.SelectAllFromCategory();
            }

            return allCategories;
        }
示例#6
0
        private Resource addImage(Connection connection, Image image)
        {
            Resource resource = new Resource( new HickoryIT.Shared.Data.Type(null, "",""), "testname", "testdescription", "testvalue");

            // TODO: Add the resource to DB
            connection.InsertResource(resource);

            // Get properties of image and add this/those
            Info inf = new Info(image);

            foreach (string propertyname in inf.PropertyItems.Keys)
            {
                Debug.WriteLine(propertyname + ": " + (inf.PropertyItems[propertyname]).ToString());
                Console.WriteLine(propertyname + ": " + (inf.PropertyItems[propertyname]).ToString());
            }
            // TODO: Save image to disc

            return resource;
        }
示例#7
0
 private Category add(Connection connection, Category category)
 {
     category.Id = connection.InsertCategory(category);
     return category;
 }
示例#8
0
        private Property add(Connection connection, Property property)
        {
            property.Id = connection.InsertProperty(property);

            return property;
        }
示例#9
0
文件: AddType.cs 项目: GriHingo/ResDB
        private HickoryIT.Shared.Data.Type add(Connection connection, HickoryIT.Shared.Data.Type type)
        {
            type.Id = connection.InsertType(type);

            return type;
        }
示例#10
0
 private Group add(Connection connection, Group group)
 {
     group.Id = connection.InsertGroup(group);
     return group;
 }