示例#1
0
 protected void SetDbRowIDAndHostId(Element element, Element host, DataRow dataRow)
 {
     Utility.Assign(dataRow, APIObjectList.ColumnRes("ColN_CST_Id"), APIObjectList.GetIdDbValue(element));
     Utility.Assign(dataRow, APIObjectList.ColumnRes("ColN_CST_Name"), APIObjectList.GetNameDbValue(element));
     Utility.Assign(dataRow, APIObjectList.ColumnRes("ColN_CST_HostId"), APIObjectList.GetIdDbValue(host));
     Utility.Assign(dataRow, APIObjectList.ColumnRes("ColN_CST_HostName"), APIObjectList.GetNameDbValue(host));
 }
示例#2
0
 protected override void PopulateDbRow(Element element, DataRow row)
 {
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_ElementId"), APIObjectList.GetIdDbValue(element));
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_ElementName"), APIObjectList.GetNameDbValue(element));
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_PhaseCreatedId"), APIObjectList.GetIdDbValue(element.CreatedPhaseId));
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_PhaseName"), APIObjectList.GetNameDbValue(element.Document.GetElement(element.CreatedPhaseId)));
 }
示例#3
0
        protected override void PopulateDbRow(Element element, DataRow row)
        {
            LineLoad lineLoad = element as LineLoad;

            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_LineLoadId"), APIObjectList.GetIdDbValue(lineLoad));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_BeamId"), APIObjectList.GetIdDbValue(lineLoad.HostElement));
        }
示例#4
0
 protected override void PopulateDbRow(Element element, DataRow row)
 {
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_Id"), APIObjectList.GetIdDbValue(element));
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_Name"), APIObjectList.GetNameDbValue(element));
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_LevelId"), APIObjectList.GetIdDbValue(element.LevelId));
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_HostId"), APIObjectList.GetIdDbValue((element as Opening).Host));
 }
示例#5
0
        protected override void PopulateDbRow(Element element, DataRow row)
        {
            AreaLoad areaLoad = element as AreaLoad;

            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_AreaLoadId"), APIObjectList.GetIdDbValue(areaLoad));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_SlabId"), APIObjectList.GetIdDbValue(areaLoad.HostElement));
        }
示例#6
0
        protected override void PopulateDbRow(Element element, DataRow row)
        {
            FamilyInstance familyInstance = element as FamilyInstance;

            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_WindowId"), APIObjectList.GetIdDbValue(element));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_WindowName"), APIObjectList.GetNameDbValue(element));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_WallId"), APIObjectList.GetIdDbValue(familyInstance.Host));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_WallName"), APIObjectList.GetNameDbValue(familyInstance.Host));
        }
示例#7
0
        protected override void PopulateDbRow(Element element, DataRow row)
        {
            RoomTag roomTag = element as RoomTag;

            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_Id"), APIObjectList.GetIdDbValue(roomTag));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_RoomTagType"), APIObjectList.GetNameDbValue(APIObjectList.GetElementById(roomTag.GetTypeId())));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_RoomId"), APIObjectList.GetIdDbValue(roomTag.Room));
            Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_ViewId"), APIObjectList.GetIdDbValue(roomTag.View));
        }
 protected override void PopulateDbRow(object element, DataRow row)
 {
     object[] array = element as object[];
     if (array == null || array.Length < 5)
     {
         return;
     }
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_Id"), array[0]);
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_PhaseId"), array[1]);
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_DesignOptionId"), array[2]);
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_FromRoom"), APIObjectList.GetIdDbValue((int)array[3]));
     Utility.Assign(row, APIObjectList.ColumnRes("ColN_CST_ToRoom"), APIObjectList.GetIdDbValue((int)array[4]));
 }
示例#9
0
        protected override object[] GetPrimaryKeyValues(object apiObject)
        {
            Element element = apiObject as Element;

            if (element != null)
            {
                return(new object[]
                {
                    APIObjectList.GetIdDbValue(element)
                });
            }
            return(new object[]
            {
                System.DBNull.Value
            });
        }