コード例 #1
0
 public DocListAttribute(AttrDef attrDef)
 {
     AttrDef     = attrDef;
     ItemsDocId  = new List <Guid>();
     AddedDocIds = new List <Guid>();
     AddedDocs   = new List <Doc>();
 }
コード例 #2
0
        /*public AttrDef(Attribute_Def source)
         * {
         *  if (source == null) return;
         *
         *  Id = source.Id;
         *  Name = source.Name ?? String.Empty;
         *  Caption = source.Full_Name ?? String.Empty;
         *  IsNotNull = source.Is_Not_Null ?? false;
         *  IsUnique = source.Is_Unique ?? false;
         *  MaxLength = source.Max_Length ?? 0;
         *  MaxValue = source.Max_Value;
         *  MinValue = source.Min_Value;
         *  DefaultValue = source.Default_Value ?? String.Empty;
         *  OrgTypeId = source.Org_Type_Id;
         *
         *  if (!source.Data_TypesReference.IsLoaded) source.Data_TypesReference.Load();
         *  if (source.Data_Types != null)
         *  {
         *      Type = new TypeDef(source.Data_Types);
         *  }
         *  if (source.Enum_Id != null)
         *  {
         *      if (!source.Enum_DefsReference.IsLoaded) source.Enum_DefsReference.Load();
         *
         *      EnumDefType = new EnumDef
         *                        {
         *                            Description = source.Enum_Defs.Description,
         *                            Id = (Guid)source.Enum_Id,
         *                            Name = source.Enum_Defs.Name ?? String.Empty,
         *                            Caption = source.Enum_Defs.Full_Name ?? String.Empty
         *                        };
         *  }
         *  if (source.Document_Id != null)
         *  {
         *      if (!source.Document_DefsReference.IsLoaded) source.Document_DefsReference.Load();
         *      DocDefType = new DocDef
         *                       {
         *                           Id = source.Document_Defs.Id,
         *                           Name = source.Document_Defs.Name ?? String.Empty,
         *                           Caption = source.Document_Defs.Full_Name ?? String.Empty,
         *                           AncestorId = source.Document_Defs.Ancestor_Id,
         *                           IsInline = source.Document_Defs.Is_Inline ?? false,
         *                           IsPublic = source.Document_Defs.Is_Public ?? false
         *                       };
         *  }
         *  Script = source.CalculateScript;
         *  BlobInfo = new BlobInfo
         *                 {
         *                     MaxHeight = source.BlobMaxHeight ?? 0,
         *                     MaxWidth = source.BlobMaxWidth ?? 0,
         *                     MaxSizeBytes = source.BlobMaxSizeBytes ?? 0,
         *                     IsImage = source.BlobIsImage ?? false
         *                 };
         * }*/

        public AttrDef(AttrDef source)
        {
            if (source == null)
            {
                return;
            }

            Id           = source.Id;
            Name         = source.Name;
            Caption      = source.Caption;
            IsNotNull    = source.IsNotNull;
            IsUnique     = source.IsUnique;
            MaxLength    = source.MaxLength;
            MaxValue     = source.MaxValue;
            MinValue     = source.MinValue;
            DefaultValue = source.DefaultValue;
            OrgTypeId    = source.OrgTypeId;

            if (source.Type != null)
            {
                Type = new TypeDef {
                    Id = source.Type.Id, Name = source.Type.Name
                }
            }
            ;

            if (source.EnumDefType != null)
            {
                EnumDefType = new EnumDef
                {
                    Description = source.EnumDefType.Description,
                    Id          = source.EnumDefType.Id,
                    Name        = source.EnumDefType.Name,
                    Caption     = source.EnumDefType.Caption
                };
            }
            if (source.DocDefType != null)
            {
                DocDefType = new DocDef
                {
                    Id         = source.DocDefType.Id,
                    Name       = source.DocDefType.Name,
                    Caption    = source.DocDefType.Caption,
                    AncestorId = source.DocDefType.AncestorId,
                    IsInline   = source.DocDefType.IsInline,
                    IsPublic   = source.DocDefType.IsPublic
                };
            }
            Script   = source.Script;
            BlobInfo = new BlobInfo
            {
                MaxHeight    = source.BlobInfo != null ? source.BlobInfo.MaxHeight : 0,
                MaxWidth     = source.BlobInfo != null ? source.BlobInfo.MaxWidth : 0,
                MaxSizeBytes = source.BlobInfo != null ? source.BlobInfo.MaxSizeBytes : 0,
                IsImage      = source.BlobInfo != null && source.BlobInfo.IsImage
            };
        }
コード例 #3
0
 public IntAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #4
0
ファイル: EnumAttribute.cs プロジェクト: tilekchubakov/CISSA
 public EnumAttribute(AttrDef atrDef)
 {
     AttrDef = atrDef;
     Value   = null;
 }
コード例 #5
0
ファイル: BlobAttribute.cs プロジェクト: tilekchubakov/CISSA
 public BlobAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #6
0
 public BoolAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #7
0
 public CurrencyAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #8
0
 public FloatAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #9
0
 public OrganizationAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #10
0
 public DocAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #11
0
 public DateTimeAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #12
0
 public DocumentStateAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #13
0
 public MetaInfoAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #14
0
ファイル: TextAttribute.cs プロジェクト: tilekchubakov/CISSA
 public TextAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }
コード例 #15
0
 public ObjectDefAttribute(AttrDef attrDef)
 {
     AttrDef = attrDef;
 }