Esempio n. 1
0
 public Resource( Type type, string name, string description, string value)
 {
     this.Type = type;
     this.Name = name;
     this.Description = description;
     this.Value = value;
 }
Esempio n. 2
0
        public HickoryIT.Shared.Data.Type Add(HickoryIT.Shared.Data.Type type)
        {
            HickoryIT.Shared.Data.Type t = Transaction <HickoryIT.Shared.Data.Type, HickoryIT.Shared.Data.Type>(add, type);

            if (t != null)
            {
                allTypes.Add(t);
            }

            return(t);
        }
Esempio n. 3
0
        public List <HickoryIT.Shared.Data.Type> SelectAllFromType()
        {
            List <HickoryIT.Shared.Data.Type>   types = new List <HickoryIT.Shared.Data.Type>();
            List <Dictionary <string, string> > list  = null;

            list = SelectFrom("Type");

            foreach (var row in list)
            {
                HickoryIT.Shared.Data.Type type = new HickoryIT.Shared.Data.Type();
                type.Id          = row["Id"].ToInt();
                type.Name        = row["Name"];
                type.Description = row["Description"];
                type.Category    = SelectCategory(row["Category_Id"].ToInt());

                types.Add(type);
            }

            return(types);
        }
Esempio n. 4
0
 public HickoryIT.Shared.Data.Type Add(HickoryIT.Shared.Data.Type type)
 {
     return(AddType().Add(type));
 }
Esempio n. 5
0
        public int InsertType(HickoryIT.Shared.Data.Type type)
        {
            string values = type.Id + @"', '" + type.Name + @"', '" + type.Description + @"', '" + type.Category.Id;

            return(Insert("Type", "Id, Name, Description, Category_Id", values));
        }
Esempio n. 6
0
        private HickoryIT.Shared.Data.Type add(Connection connection, HickoryIT.Shared.Data.Type type)
        {
            type.Id = connection.InsertType(type);

            return(type);
        }
Esempio n. 7
0
        public List<HickoryIT.Shared.Data.Type> SelectAllFromType()
        {
            List<HickoryIT.Shared.Data.Type> types = new List<HickoryIT.Shared.Data.Type>();
            List<Dictionary<string, string>> list = null;

            list = SelectFrom("Type");

            foreach (var row in list)
            {
                HickoryIT.Shared.Data.Type type = new HickoryIT.Shared.Data.Type();
                type.Id = row["Id"].ToInt();
                type.Name = row["Name"];
                type.Description = row["Description"];
                type.Category = SelectCategory(row["Category_Id"].ToInt());

                types.Add(type);
            }

            return types;
        }