Exemplo n.º 1
0
        public void Handle(LicenseeCreated createdEvent)
        {
            var repository = _container.Resolve <IReportRepository>();
            var record     = repository.LicenseeRecords.SingleOrDefault(r => r.LicenseeId == createdEvent.Id);

            if (record != null)
            {
                return;
            }
            record = new LicenseeRecord
            {
                LicenseeId      = createdEvent.Id,
                Name            = createdEvent.Name,
                CompanyName     = createdEvent.CompanyName,
                EmailAddress    = createdEvent.Email,
                AffiliateSystem = createdEvent.AffiliateSystem,
                Status          = LicenseeStatus.Inactive.ToString(),
                ContractStart   = createdEvent.ContractStart,
                ContractEnd     = createdEvent.ContractEnd,
                Created         = createdEvent.EventCreated,
                CreatedBy       = createdEvent.EventCreatedBy
            };
            repository.LicenseeRecords.Add(record);
            repository.SaveChanges();
        }
Exemplo n.º 2
0
 public ActionResult ExportLicenseeReport(LicenseeRecord filters, string sortColumnName, string sortOrder, string hiddenColumns = null)
 {
     return(ExportReport(_queries.GetLicenseeRecordsForExport(), filters, sortColumnName, sortOrder, hiddenColumns));
 }