コード例 #1
0
        public void Add()
        {
            AttributeModel attributeItem = new AttributeModel
            {
                ID          = Guid.NewGuid(),
                Project_ID  = Globals.Project_ID,
                Attribute   = "New Attribute",
                Description = "New Attribute Description",
                IsChanged   = false,
                IsNew       = true,
            };

            Attributes.Add(attributeItem);
            IsChanged = true;
        }
コード例 #2
0
 /// <summary>
 /// Load all object types defined in tblObjectTypes table (This is project independent
 /// </summary>
 public void Load()
 {
     using (EDBEntities eDB = new EDBEntities())
     {
         foreach (tblAttribute Rec in (from a in eDB.tblAttributes where (a.Project_ID == Globals.Project_ID) orderby a.Attribute select a))
         {
             AttributeModel attributeItem = new AttributeModel
             {
                 ID          = Rec.ID,
                 Project_ID  = Rec.Project_ID,
                 Attribute   = Rec.Attribute,
                 Description = Rec.Description,
                 IsDeleted   = false
             };
             Attributes.Add(attributeItem);
         }
     }
 }