Пример #1
0
        private void InitField(XmlNode node, XmlNamespaceManager xm, bool isSharedField)
        {
            this._name       = GetAttribute(node, "name");
            this.Title       = GetAttribute(node, "name");
            this.Description = GetAttribute(node, "description");
            string type = GetAttribute(node, "type");

            this._sourceType = this.GetSourceType(type);
            string kind = GetAttribute(node, "kind");

            this.ShowInDisplayForm = true;
            this.ShowInEditForm    = true;
            this.ShowInNewForm     = true;
            this.Required          = false;
            this.Hidden            = false;
            this._isSharedField    = isSharedField;
            switch (kind)
            {
            case "computed":
            case "computedfordisplay":
            case "computedwhencomposed":
                this._computed   = true;
                this._isReadonly = true;
                break;

            default:
                this._isReadonly = false;
                break;
            }
            this.TargetType = MappingInfo.GetTargetFieldType(this.SourceType);
            //Codeを取得
            if (node.NodeType == XmlNodeType.Element)
            {
                this.GetCodes((XmlElement)node, xm);
            }
            //フィールド別の個別属性を取得する
            this.GetFieldInfo(node, xm);
        }