Ejemplo n.º 1
0
 /// <summary>
 /// Create a new Member object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="categoryID">Initial value of the CategoryID property.</param>
 /// <param name="startDate">Initial value of the StartDate property.</param>
 /// <param name="renewalDate">Initial value of the RenewalDate property.</param>
 /// <param name="status">Initial value of the Status property.</param>
 public static Member CreateMember(global::System.Guid id, global::System.Guid categoryID, global::System.DateTime startDate, global::System.DateTime renewalDate, global::System.Int32 status)
 {
     Member member = new Member();
     member.ID = id;
     member.CategoryID = categoryID;
     member.StartDate = startDate;
     member.RenewalDate = renewalDate;
     member.Status = status;
     return member;
 }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
        public MemberModel(Member member)
        {
            _member = member;

            MembershipUpdates = new ObservableCollection<MembershipUpdate>();

            if (_member != null)
            {
                if (_member.Contact != null) _contact = new ContactModel(_member.Contact);

                StartDate = _member.StartDate == default(DateTime) ? (DateTime?)null : Convert.ToDateTime(_member.StartDate);

                RenewalDate = _member.RenewalDate == default(DateTime) ? (DateTime?)null : Convert.ToDateTime(_member.RenewalDate);

                MemberNotes = new ObservableCollection<MemberNoteModel>(_member.MemberNotes.OrderByDescending(x => x.CreationDate).Select(x => new MemberNoteModel(x)));
            }
            else
                MemberNotes = new ObservableCollection<MemberNoteModel>();

        }