public Resource( Type type, string name, string description, string value) { this.Type = type; this.Name = name; this.Description = description; this.Value = value; }
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); }
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); }
public HickoryIT.Shared.Data.Type Add(HickoryIT.Shared.Data.Type type) { return(AddType().Add(type)); }
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)); }
private HickoryIT.Shared.Data.Type add(Connection connection, HickoryIT.Shared.Data.Type type) { type.Id = connection.InsertType(type); return(type); }
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; }