Exemplo 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;
 }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo n.º 4
0
 public HickoryIT.Shared.Data.Type Add(HickoryIT.Shared.Data.Type type)
 {
     return(AddType().Add(type));
 }
Exemplo 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));
        }
Exemplo n.º 6
0
        private HickoryIT.Shared.Data.Type add(Connection connection, HickoryIT.Shared.Data.Type type)
        {
            type.Id = connection.InsertType(type);

            return(type);
        }
Exemplo 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;
        }