예제 #1
0
 protected override void EntityClear()
 {
     _entityMember = new Member();
     _entityMember.SystemCreateDate = new DateTime();
     _entityMember.SystemEditDate = new DateTime();
     _entityMember.CreateDate = new DateTime();
     _entityMember.EditDate = new DateTime();
     _entityMember.IsSuperAdmin = false;
     _entityMember.IsMasterAdmin = false;
     _entityMember.IsUserAdmin = false;
     _entityMember.IsCategoryAdmin = false;
     _entityMember.IsArticleAdmin = false;
     _entityMember.IsBanned = false;
     _entityMember.Id = -1;
     _entityMember.Password = null;
 }
예제 #2
0
 protected static ProviderMember _EntityToProvider(Member memberEntity)
 {
     return new ProviderMember(memberEntity);
 }
예제 #3
0
        /* TODO: revisit all copy functions
        override public bool Copy(Provider untyped)
        {
            //Never copy over the id, otherwise we would be creating
            //a pseudo-reference copy, which we don't want.
            //Do not copy over the system times and only the business logic
            //times since the system times are specific to a given instance.
            ProviderMember aMember = (ProviderMember)untyped;
            _entityMember.CreateDate = aMember._entityMember.CreateDate;
            _entityMember.EditDate = aMember._entityMember.EditDate;
            _entityMember.Email = aMember._entityMember.Email;
            _entityMember.IsSuperAdmin = aMember._entityMember.IsSuperAdmin;
            _entityMember.IsMasterAdmin = aMember._entityMember.IsMasterAdmin;
            _entityMember.IsCategoryAdmin = aMember._entityMember.IsCategoryAdmin;
            _entityMember.IsUserAdmin = aMember._entityMember.IsUserAdmin;
            _entityMember.IsArticleAdmin = aMember._entityMember.IsArticleAdmin;
            _entityMember.IsBanned = aMember._entityMember.IsBanned;
            _entityMember.UserName = aMember._entityMember.UserName;

            // for security reasons all these attributes are handled differently
            //_entityMember.Password = aMember._entityMember.Password; Do not copy password for security reasons
            //_entityMember.IssuedKey = aMember._entityMember.IssuedKey; Do not copy IssuedKey for security reasons
            //_entityMember.OpenId = aMember._entityMember.OpenId; Do not copy OpenId for security reasons
            _entityMember.IsValidEmail = false;

            _pendingPostedPhotoIds.Copy(aMember._pendingPostedPhotoIds);

            _entityObject = _entityMember;
            return true;
        }
        */
        //=========================================================
        // PRIVATE FUNCTIONS
        //=========================================================
        protected internal ProviderMember(Member aMember)
            : base(aMember)
        {
        }
예제 #4
0
 protected ProviderCurrentMember(Member aMember)
     : base(aMember)
 {
 }
 /// <summary>
 /// Create a new Member object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="editDate">Initial value of the EditDate property.</param>
 /// <param name="createDate">Initial value of the CreateDate property.</param>
 /// <param name="isSuperAdmin">Initial value of the IsSuperAdmin property.</param>
 /// <param name="isMasterAdmin">Initial value of the IsMasterAdmin property.</param>
 /// <param name="isUserAdmin">Initial value of the IsUserAdmin property.</param>
 /// <param name="isCategoryAdmin">Initial value of the IsCategoryAdmin property.</param>
 /// <param name="isBanned">Initial value of the IsBanned property.</param>
 /// <param name="systemEditDate">Initial value of the SystemEditDate property.</param>
 /// <param name="systemCreateDate">Initial value of the SystemCreateDate property.</param>
 /// <param name="isArticleAdmin">Initial value of the IsArticleAdmin property.</param>
 public static Member CreateMember(global::System.Int64 id, global::System.DateTime editDate, global::System.DateTime createDate, global::System.Boolean isSuperAdmin, global::System.Boolean isMasterAdmin, global::System.Boolean isUserAdmin, global::System.Boolean isCategoryAdmin, global::System.Boolean isBanned, global::System.DateTime systemEditDate, global::System.DateTime systemCreateDate, global::System.Boolean isArticleAdmin)
 {
     Member member = new Member();
     member.Id = id;
     member.EditDate = editDate;
     member.CreateDate = createDate;
     member.IsSuperAdmin = isSuperAdmin;
     member.IsMasterAdmin = isMasterAdmin;
     member.IsUserAdmin = isUserAdmin;
     member.IsCategoryAdmin = isCategoryAdmin;
     member.IsBanned = isBanned;
     member.SystemEditDate = systemEditDate;
     member.SystemCreateDate = systemCreateDate;
     member.IsArticleAdmin = isArticleAdmin;
     return member;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Members EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMembers(Member member)
 {
     base.AddObject("Members", member);
 }