Пример #1
0
            internal void NewItemPropertiesTableRow(ItemPropertiesTableRow iptr, long ParentTagID)
            {
                ItemPropertiesTableRow newiptr = NewItemPropertiesTableRow();

                newiptr.ID_Code           = iptr.ID_Code;
                newiptr.ID_Name_Name      = iptr.ID_Name_Name;
                newiptr.ID_Name_Namespace = iptr.ID_Name_Namespace;
                newiptr.TagID             = ParentTagID;
                newiptr.Value             = iptr.Value;
                AddItemPropertiesTableRow(newiptr);
            }
Пример #2
0
            /// <summary>
            /// Adds the row.
            /// </summary>
            /// <param name="item">The item.</param>
            /// <param name="tagID">The tag identifier.</param>
            /// <returns>System.Int32.</returns>
            /// <exception cref="System.ArgumentException">Item result is not ok</exception>
            public int AddRow(ItemProperty item, int tagID)
            {
                if (item.ResultID != ResultID.S_OK)
                {
                    throw new ArgumentException("Item result is not ok");
                }
                ItemPropertiesTableRow mRow = this.NewItemPropertiesTableRow();

                mRow.TagID       = tagID;
                mRow.Description = item.Description;
                mRow.ItemName    = item.ItemName;
                mRow.ItemPath    = item.ItemPath;
                if (item.ID.Name != null && !item.ID.Name.IsEmpty)
                {
                    mRow.ID_Name_Name      = item.ID.Name.Name;
                    mRow.ID_Name_Namespace = item.ID.Name.Namespace;
                }
                mRow.ID_Code   = item.ID.Code;
                mRow.SOAPValue = item.Value;
                this.AddItemPropertiesTableRow(mRow);
                return(mRow.ID);
            }
Пример #3
0
            /// <summary>
            /// Determines whether data type conversion is null.
            /// </summary>
            /// <returns>
            ///     <c>true</c> if data type conversion is null; otherwise, <c>false</c>.
            /// </returns>
            public bool IsDataTypeConversionNull()
            {
                ItemPropertiesTableRow iptr = GetDataTypeItemPropertiesTableRow();

                if (iptr != null)
                {
                    if (iptr.IsValueNull())
                    {
                        return(true);
                    }
                    if (iptr.Value == null)
                    {
                        return(true);
                    }
                    if (iptr.Value == "")
                    {
                        return(true);
                    }
                    myDataTypeConversionPropertiesRow = iptr;
                    return(false);
                }
                return(true);
            }