/// <summary>
        /// Alleen als de application-controller een select-proces in behandeling neemt van zijn presenter
        /// deze functie gebruiken.
        /// </summary>
        /// <param name="master"></param>
        public void UpdateDetails(AuditItem master)
        {
            m_DetailsLastUpdated = master.Details;

            AddMaster(master);
            Master = master;
        }
 /// <summary>
 /// De repository van masters inrichten en herinrichten, als de master al bestaat.
 /// </summary>
 /// <param name="master"></param>
 public void AddMaster(AuditItem master)
 {
     AuditItem found;
     m_QueueMasters.TryGetValue(master.Id, out found);
     if (m_QueueMasters != null && found == null)
     {
         m_QueueMasters.Add(new KeyValuePair<int, AuditItem>(master.Id, master));
     }
 }
Exemple #3
0
 // Copy constructor
 public AuditItem(AuditItem other)
 {
     DatumTijd = other.DatumTijd;
     ActieNemer = other.ActieNemer;
     Actie = other.Actie;
     Tabel = other.Tabel;
     Veld = other.Veld;
     SleutelWaarde = other.SleutelWaarde;
     WaardeVan = other.WaardeVan;
     WaardeNaar = other.WaardeNaar;
 }
 public void AddBusinessEntity(AuditItem audit)
 {
     AudittrailService.AddBusinessEntity(audit);
 }
 public static AuditItem FindBusinessEntity(IList<AuditItem> entities,
                                                 AuditItem entity)
 {
     // <pex>
     if (Equals(entity, default(AuditItem)))
         throw new ArgumentNullException("entity");
     // </pex>
     IEnumerable<AuditItem> result;
     if (entities != null)
     {
         result = entities.Where(businessObject => businessObject.Id.Equals(entity.Id));
         return result.FirstOrDefault();             
     }
     return null;
 }
        public void UpdateDetailBusinessEntity(AuditItem updatedDetail)
        {
            // <pex>
            if (updatedDetail == null)
                throw new ArgumentNullException("updatedDetail");
            // </pex>
            var master = m_BusinessEntities.Where(mas => mas.DataKeyValue == updatedDetail.Master).FirstOrDefault();
            var details = master.Details;

            var found = FindBusinessEntity(details, updatedDetail);
            if (found != null)
            {
                details.Where(detail => detail.Id == found.Id).
                                Update( detail =>
                                        {
                                            detail.DataKeyValue = updatedDetail.DataKeyValue;
                                            
                                        });
            }
        }
        public void DeleteDetailBusinessEntity(AuditItem detail)
        {
            var master = m_BusinessEntities.Where(mas => mas.DataKeyValue == detail.Master).FirstOrDefault();
            var details = master.Details;

            var found = FindBusinessEntity(details, detail);
            if (found != null)
            {
                details.Remove(found);
            }
        }
        public void AddDetailBusinessEntity(AuditItem detail)
        {
            var master = m_BusinessEntities.Where(mas => mas.Id == detail.Parent.Id).FirstOrDefault();
            var details = master.Details;

            var found = FindBusinessEntity(details, detail);
            if (found == null)
            {
                detail.Id = m_Id;
                details.Add(detail);
                m_Id++;
            }
        }
 public void AddBusinessEntity(AuditItem audit)
 {
     throw new NotImplementedException();
 }