public async Task Test_Passing_Null_Who_Throws_Exception() { // ARRANGE IOrganisation organisation = Create.Organisation(); Mock <ILogger <IOrganisationService> > loggerMock = MockFactory.CreateLoggerMock <IOrganisationService>(); DbContextOptions <DataContext> dbOptions = TestUtils.DbContextOptionsInMemory <CreateAsyncTests>( nameof(this.Test_Passing_Valid_Values)); await using DataContext dataContext = new DataContext(dbOptions); IVirtualBridgeData data = MockFactory.CreateVirtualBridgeData( dataContext); IOrganisationService service = new OrganisationService( loggerMock.Object, data); // ACT await service.CreateAsync( who : null !, auditEvent : EAuditEvent.OrganisationMaintenance, organisation : organisation) .ConfigureAwait(false); }
protected ReadOnlyUrl GetCreditsUrl(IOrganisation organisation) { var url = (_organisationsUrl.AbsoluteUri + "/") .AddUrlSegments(organisation.Id + "/credits"); return(new ReadOnlyApplicationUrl(url.ToLower())); }
private void TestCredits(IUser administrator, IOrganisation organisation) { // Allocate. var contactCredit = _creditsQuery.GetCredit <ContactCredit>(); var applicantCredit = _creditsQuery.GetCredit <ApplicantCredit>(); var jobAdCredit = _creditsQuery.GetCredit <JobAdCredit>(); var allocations = new List <Allocation>(); if (organisation.IsVerified) { // Give them unlimited everything. allocations.Add(Allocate(organisation, contactCredit, null, DateTime.Now.AddYears(1))); allocations.Add(Allocate(organisation, applicantCredit, null, DateTime.Now.AddYears(1))); allocations.Add(Allocate(organisation, jobAdCredit, null, DateTime.Now.AddYears(1))); } else { // Give them a package. allocations.Add(Allocate(organisation, contactCredit, 30, DateTime.Now.AddYears(1))); allocations.Add(Allocate(organisation, applicantCredit, 400, DateTime.Now.AddYears(1))); allocations.Add(Allocate(organisation, jobAdCredit, null, DateTime.Now.AddYears(1))); } LogIn(administrator); Get(GetCreditsUrl(organisation)); AssertPageDoesNotContain("There are no credits allocated to this organisation."); AssertAllocations(organisation.Id, allocations); }
protected ReadOnlyUrl GetReportUrl(IOrganisation organisation, string type) { var url = (_organisationsUrl.AbsoluteUri + "/") .AddUrlSegments(organisation.Id + "/reports/" + type); return(new ReadOnlyApplicationUrl(url.ToLower())); }
protected ReadOnlyUrl GetNewEmployerUrl(IOrganisation organisation) { var url = (_organisationsUrl.AbsoluteUri + "/") .AddUrlSegments(organisation.Id + "/employers/new"); return(new ReadOnlyApplicationUrl(url.ToLower())); }
/// <inheritdoc/> public async Task CreateOrganisationAsync( IWho who, AuditEvent auditEvent, IOrganisation organisation) { this.logger.ReportEntry( who, new { Organisation = organisation }); try { IAuditHeaderWithAuditDetails auditHeader = this.data.BeginTransaction(auditEvent, who); await this.data .CreateOrganisationAsync( who : who, auditHeader : auditHeader, organisation : organisation) .ConfigureAwait(false); await this.data.CommitTransactionAsync(auditHeader) .ConfigureAwait(false); } catch (Exception) { this.data.RollbackTransaction(); throw; } this.logger.ReportExit(who); }
/// <inheritdoc/> public async Task UpdateAsync( IWho who, IAuditHeaderWithAuditDetails auditHeader, IOrganisation organisation) { this.logger.LogTrace( "ENTRY {Method}(who, organisation) {@Who} {@Organisation}", nameof(this.UpdateAsync), who, organisation); OrganisationDto dto = OrganisationDto.ToDto(organisation); OrganisationDto original = await this.context.FindAsync <OrganisationDto>(organisation.Id) .ConfigureAwait(false); Audit.AuditUpdate(auditHeader, dto.Id, original, dto); this.context.Entry(original).CurrentValues.SetValues(dto); await this.context.SaveChangesAsync().ConfigureAwait(false); this.logger.LogTrace( "EXIT {Method}(who) {@Who}", nameof(this.UpdateAsync), who); }
public ContactCandidateEmail(ICommunicationUser member, string employerEmailAddress, IEmployer employer, string subject, string content) : base(member, GetEmployer(employer, employerEmailAddress)) { _subject = subject; _content = content; _organisation = employer.Organisation; }
public async Task CanGetAnOrganisationTest() { //GIVEN A known organisation identifier string expectedUrl = $"{ExampleOktaDomain}/api/v1/orgs/{ExampleOktaOrgName}"; var mockClient = new Mock <IOktaClient>(MockBehavior.Strict); var client = mockClient.Object; mockClient.Setup(x => x.Configuration) .Returns(new OktaClientConfiguration() { OktaDomain = ExampleOktaDomain }); mockClient.Setup(x => x.GetAsync <Organisation>(expectedUrl, It.IsAny <CancellationToken>())) .Returns(Task.FromResult(new Organisation { Name = "TestOrg" })); //WHEN A request is made to get an organisation IOrganisation result = await client.Organisations().GetOrganisation(ExampleOktaOrgName, CancellationToken.None); //THEN The correct url should be called and all the contents should be suitably deserialised Assert.That(result.Name, Is.EqualTo("TestOrg"), "Mocked org should be returned"); mockClient.VerifyAll(); }
private void AssertSavedLogins(IOrganisation organisation, ICollection <Employer> expectedEmployers) { var recruiters = _recruitersQuery.GetRecruiters(organisation.Id); Assert.AreEqual(expectedEmployers.Count, recruiters.Count); foreach (var expectedEmployer in expectedEmployers) { var id = _loginCredentialsQuery.GetUserId(expectedEmployer.GetLoginId()); var employer = _employersQuery.GetEmployer(id.Value); Assert.IsNotNull(employer); // Check one of the recrutiers for the organisation. Assert.AreEqual(true, (from r in recruiters where r == employer.Id select r).Any()); Assert.AreEqual(expectedEmployer.EmailAddress, employer.EmailAddress); Assert.AreEqual(expectedEmployer.FirstName, employer.FirstName); Assert.AreEqual(expectedEmployer.LastName, employer.LastName); Assert.AreEqual(expectedEmployer.PhoneNumber, employer.PhoneNumber); Assert.AreEqual(expectedEmployer.JobTitle, employer.JobTitle); Assert.AreEqual(expectedEmployer.SubRole, employer.SubRole); Assert.AreEqual(1, employer.Industries.Count); Assert.AreEqual(expectedEmployer.Industries[0].Id, employer.Industries[0].Id); } }
/// <summary> /// Converts view model to Committee domain object. /// </summary> /// <param name="organisation">Organisation.</param> /// <returns>Committee domain object.</returns> public ICommittee ToDomain(IOrganisation organisation) { return(new Domain.DomainObjects.Committees.Committee( id: Guid.NewGuid(), organisation: organisation, name: this.Name, description: this.Description)); }
/// <summary> /// Initializes a new instance of the <see cref="OrganisationMutableObjectCore"/> class. /// </summary> /// <param name="organisation">The organisation.</param> protected OrganisationMutableObjectCore(IOrganisation organisation) : base(organisation) { foreach (IContact contact in organisation.Contacts) { AddContact(new ContactMutableObjectCore(contact)); } }
private static string GetReportFileName(IOrganisation organisation, EmployerReport report) { if (report is ResumeSearchActivityReport) { return("Resume search activity - " + organisation.FullName + ".pdf"); } return("Job board activity - " + organisation.FullName + ".pdf"); }
private Allocation Allocate(IOrganisation organisation, Credit credit, int?quantity, DateTime?expiryDate) { var allocation = new Allocation { OwnerId = organisation.Id, CreditId = credit.Id, ExpiryDate = expiryDate, InitialQuantity = quantity }; _allocationsCommand.CreateAllocation(allocation); return(allocation); }
private static string GetOrganisationHtml(this HtmlHelper htmlHelper, IOrganisation organisation) { var tagBuilder = new TagBuilder("strong") { InnerHtml = htmlHelper.Encode(organisation.Name) }; return(tagBuilder.ToString(TagRenderMode.Normal)); }
private Employer CreateEmployer(IOrganisation organisation) { var employer = _employerAccountsCommand.CreateTestEmployer(0, organisation); employer.Organisation = organisation; employer.CreatedTime = DateTime.Now.AddYears(-1); // Must exist before the reporting period _employerAccountsCommand.UpdateEmployer(employer); return(employer); }
protected Employer CreateEmployer(IOrganisation organisation) { var employer = _employersCommand.CreateTestEmployer(0, organisation); _jobPostersCommand.CreateJobPoster(new JobPoster { Id = employer.Id }); return(employer); }
private static MockEmailAttachment[] GetAttachments(IOrganisation organisation, params ReportStatus[] statuses) { // Include if there is activity or if marked. return((from a in statuses where a.IsActivity || a.Report.ReportFileEvenIfNoResults select new MockEmailAttachment { Name = GetReportFileName(organisation, a.Report), MediaType = "application/pdf" }).ToArray()); }
private static void PrepareUpdate(IOrganisation organisation) { // Make sure the location is set up properly, even on an update, // because the property may have been set to a new instance. if (organisation.Address != null) { organisation.Address.Prepare(); } }
private static IParticipationAcdCustodian CreateAcdCustodianOrganisation(string name, string department, string id, string addressLine, string phone, bool mandatoryOnly) { var custodianParticipation = AcdCustodianRecord.CreateParticipationAcdCustodian(); custodianParticipation.ParticipationPeriod = BaseCDAModel.CreateInterval( new ISO8601DateTime(DateTime.Now.AddDays(-50)), new ISO8601DateTime(DateTime.Now)); custodianParticipation.Role = BaseCDAModel.CreateRole(Occupation.GeneralMedicalPractitioner); custodianParticipation.Participant = AcdCustodianRecord.CreateAcdCustodian(); IOrganisation organisation = BaseCDAModel.CreateOrganisation(); organisation.Name = name; organisation.Identifiers = new List <Identifier> { BaseCDAModel.CreateHealthIdentifier(HealthIdentifierType.HPIO, id) }; custodianParticipation.Participant.Organisation = organisation; if (!mandatoryOnly) { organisation.Department = department; organisation.NameUsage = OrganisationNameUsage.EnterpriseName; // Address IAddressAustralian address1 = BaseCDAModel.CreateAddress(); address1.AddressPurpose = AddressPurpose.Residential; address1.AustralianAddress = BaseCDAModel.CreateAustralianAddress(); address1.AustralianAddress.UnstructuredAddressLines = new List <string> { addressLine }; address1.AustralianAddress.SuburbTownLocality = "Nehtaville"; address1.AustralianAddress.State = AustralianState.QLD; address1.AustralianAddress.PostCode = "5555"; address1.AustralianAddress.DeliveryPointId = 32568931; custodianParticipation.Participant.Addresses = new List <IAddressAustralian> { address1 }; // Communication var electronicCommunicationDetail = BaseCDAModel.CreateElectronicCommunicationDetail ( phone, ElectronicCommunicationMedium.Telephone, ElectronicCommunicationUsage.WorkPlace ); custodianParticipation.Participant.ElectronicCommunicationDetails = new List <ElectronicCommunicationDetail> { electronicCommunicationDetail }; } return(custodianParticipation); }
private static string GetResultMessage(EmployerReport report, IOrganisation organisation, string result) { if (report is CandidateCareReport) { return(string.IsNullOrEmpty(result) ? string.Format("{0} has not referred any members during this reporting period.", HttpUtility.HtmlEncode(organisation.FullName)) : string.Format("{0} has referred {1} member{2} during this reporting period.", HttpUtility.HtmlEncode(organisation.FullName), result, result == "1" ? "" : "s")); } return(null); }
/// <summary> /// Initializes a new instance of the <see cref="Committee"/> class. /// </summary> /// <param name="id">Committee Id.</param> /// <param name="organisation">Organisation.</param> /// <param name="name">Group Name.</param> /// <param name="description">Group Description.</param> public Committee( Guid id, IOrganisation organisation, string name, string description) { this.Id = id; this.Organisation = organisation; this.Name = !string.IsNullOrEmpty(name) ? name : throw new ArgumentNullException(nameof(name)); this.Description = !string.IsNullOrEmpty(description) ? description : throw new ArgumentNullException(nameof(description)); }
/// <summary> /// Initializes a new instance of the <see cref="CommitteeWithMeetings"/> class. /// </summary> /// <param name="id">Committee Id.</param> /// <param name="organisation">Organisation.</param> /// <param name="name">Committee Name.</param> /// <param name="description">Committee Description.</param> /// <param name="meetings">Meetings.</param> public CommitteeWithMeetings( Guid id, IOrganisation organisation, string name, string description, IList <IMeeting> meetings) : base( id, organisation, name, description) { this.Meetings = meetings; }
/// <summary> /// Initializes a new instance of the <see cref="OrganisationDto"/> class. /// </summary> /// <param name="organisation">The organisation.</param> public OrganisationDto(IOrganisation organisation) { if (organisation == null) { throw new ArgumentNullException(nameof(organisation)); } this.Id = organisation.Id; this.Code = organisation.Code; this.Name = organisation.Name; }
public MerchantTerminals(IDatabaseConnectionFactory databaseConnectionFactory, IConfiguration configuration, ISharedJPOSService sharedJPOSService, IOrganisation organisation, IOrganisationProgram organisationProgram, IPrograms program) : base(databaseConnectionFactory) { _databaseConnectionFactory = databaseConnectionFactory ?? throw new ArgumentNullException(nameof(databaseConnectionFactory)); _configuration = configuration; _sharedJPOSService = sharedJPOSService; _organisation = organisation; _organisationProgram = organisationProgram; _program = program; }
private static string GetLink(IOrganisation organisation) { var url = new ReadOnlyApplicationUrl("~/administrators/organisations/" + organisation.Id); var sb = new StringBuilder(); sb.Append("<a href=\"") .Append(url.PathAndQuery) .Append("\">") .Append(organisation.FullName) .Append("</a>"); return(sb.ToString()); }
/// <summary> /// Creates the view model. /// </summary> /// <param name="organisation">Organisation.</param> /// <returns>View model.</returns> public static OrganisationViewModel Create(IOrganisation organisation) { if (organisation == null) { throw new ArgumentNullException(nameof(organisation)); } return(new OrganisationViewModel( organisationId: organisation.Id, code: organisation.Code, name: organisation.Name)); }
/// <inheritdoc /> public Task CreateOrganisationAsync( IWho who, EAuditEvent auditEvent, IOrganisation organisation) { return(OrganisationHelper.CreateOrganisationAsync( logger: this.logger, data: this.data, who: who, auditEvent: auditEvent, organisation: organisation)); }
/// <inheritdoc /> public Task CreateAsync( IWho who, EAuditEvent auditEvent, IOrganisation organisation) { if (who == null) { throw new ArgumentNullException(nameof(who)); } if (organisation == null) { throw new ArgumentNullException(nameof(organisation)); } return(CreateOrganisationInternalAsync()); async Task CreateOrganisationInternalAsync() { this.logger.LogTrace( "ENTRY {Method}(who, organisation) {@Who} {@Organisation}", nameof(this.CreateAsync), who, organisation); try { IAuditHeaderWithAuditDetails auditHeader = await this.data.BeginTransactionAsync( who, auditEvent) .ConfigureAwait(false); await this.data.Organisation.CreateAsync( who : who, auditHeader : auditHeader, organisation : organisation) .ConfigureAwait(false); await this.data.CommitTransactionAsync(who, auditHeader) .ConfigureAwait(false); } catch (Exception) { this.data.RollbackTransaction(who); throw; } this.logger.LogTrace( "EXIT {Method}(who) {@Who}", nameof(this.CreateAsync), who); } }
/// <summary> /// Converts domain object to DTO. /// </summary> /// <param name="organisation">Organisation.</param> /// <returns>Organisation DTO.</returns> public static OrganisationDto ToDto(IOrganisation organisation) { if (organisation == null) { throw new ArgumentNullException(nameof(organisation)); } return(new OrganisationDto( id: organisation.Id, code: organisation.Code, name: organisation.Name, bgColour: organisation.BgColour)); }
/// <summary> /// Creates the Add view model. /// </summary> /// <param name="organisation">Organisation.</param> /// <returns>Add view model.</returns> public static AddViewModel Create(IOrganisation organisation) { if (organisation == null) { throw new ArgumentNullException(nameof(organisation)); } return(new AddViewModel( formState: FormState.Initial, organisationId: organisation.Id, organisationName: organisation.Name, name: string.Empty, description: string.Empty)); }
/// <summary> This method copy's each database field into the <paramref name="target"/> interface. </summary> public void Copy_To(IOrganisation target, bool includePrimaryKey = false) { if (includePrimaryKey) target.Id = this.Id; target.NameId = this.NameId; target.Beschreibung = this.Beschreibung; target.CodeName = this.CodeName; target.OrganisationenTypId = this.OrganisationenTypId; target.OrganisationenTypName = this.OrganisationenTypName; target.EMail = this.EMail; target.Tel = this.Tel; target.OrtsId = this.OrtsId; target.Www = this.Www; target.KontaktPerson = this.KontaktPerson; target.MaterialRoot = this.MaterialRoot; target.ParentOrganisationsId = this.ParentOrganisationsId; target.WordUpRootId = this.WordUpRootId; target.LastUpdateToken = this.LastUpdateToken; }
/// <summary> /// This method copy's each database field which is in the <paramref name="includedColumns"/> /// from the <paramref name="source"/> interface to this data row. /// </summary> public void Copy_From_But_TakeOnly(IOrganisation source, params string[] includedColumns) { if (includedColumns.Contains(OrganisationenTable.IdCol)) this.Id = source.Id; if (includedColumns.Contains(OrganisationenTable.BereichCol)) this.Bereich = source.Bereich; if (includedColumns.Contains(OrganisationenTable.NameIdCol)) this.NameId = source.NameId; if (includedColumns.Contains(OrganisationenTable.DisplayShortNameCol)) this.DisplayShortName = source.DisplayShortName; if (includedColumns.Contains(OrganisationenTable.DisplayShortAdditionalCol)) this.DisplayShortAdditional = source.DisplayShortAdditional; if (includedColumns.Contains(OrganisationenTable.NameCol)) this.Name = source.Name; if (includedColumns.Contains(OrganisationenTable.AddOnStringsCol)) this.AddOnStrings = source.AddOnStrings; if (includedColumns.Contains(OrganisationenTable.OeffnungsZeitenCol)) this.OeffnungsZeiten = source.OeffnungsZeiten; if (includedColumns.Contains(OrganisationenTable.TelefonO1Col)) this.TelefonO1 = source.TelefonO1; if (includedColumns.Contains(OrganisationenTable.TelefonO2Col)) this.TelefonO2 = source.TelefonO2; if (includedColumns.Contains(OrganisationenTable.EMailO1Col)) this.EMailO1 = source.EMailO1; if (includedColumns.Contains(OrganisationenTable.EMailO2Col)) this.EMailO2 = source.EMailO2; if (includedColumns.Contains(OrganisationenTable.WwwOCol)) this.WwwO = source.WwwO; if (includedColumns.Contains(OrganisationenTable.FaxOCol)) this.FaxO = source.FaxO; if (includedColumns.Contains(OrganisationenTable.YouTubeOCol)) this.YouTubeO = source.YouTubeO; if (includedColumns.Contains(OrganisationenTable.FaceBookOCol)) this.FaceBookO = source.FaceBookO; if (includedColumns.Contains(OrganisationenTable.WarenAngebotCol)) this.WarenAngebot = source.WarenAngebot; if (includedColumns.Contains(OrganisationenTable.OrganisationsSubTypIdCol)) this.OrganisationsSubTypId = source.OrganisationsSubTypId; if (includedColumns.Contains(OrganisationenTable.OrganisationsTypIdCol)) this.OrganisationsTypId = source.OrganisationsTypId; if (includedColumns.Contains(OrganisationenTable.AdressIdCol)) this.AdressId = source.AdressId; if (includedColumns.Contains(OrganisationenTable.BesonderesCol)) this.Besonderes = source.Besonderes; if (includedColumns.Contains(OrganisationenTable.BeschreibungCol)) this.Beschreibung = source.Beschreibung; if (includedColumns.Contains(OrganisationenTable.FinanziellesCol)) this.Finanzielles = source.Finanzielles; if (includedColumns.Contains(OrganisationenTable.ExterneKennungCol)) this.ExterneKennung = source.ExterneKennung; if (includedColumns.Contains(OrganisationenTable.ZVRNameCol)) this.ZVRName = source.ZVRName; if (includedColumns.Contains(OrganisationenTable.KaufParkIdCol)) this.KaufParkId = source.KaufParkId; if (includedColumns.Contains(OrganisationenTable.MaterialConnectorCol)) this.MaterialConnector = source.MaterialConnector; if (includedColumns.Contains(OrganisationenTable.ModifyTimeStampCol)) this.ModifyTimeStamp = source.ModifyTimeStamp; if (includedColumns.Contains(OrganisationenTable.ProcessingStatusCol)) this.ProcessingStatus = source.ProcessingStatus; if (includedColumns.Contains(OrganisationenTable.LastModifiedByCol)) this.LastModifiedBy = source.LastModifiedBy; if (includedColumns.Contains(OrganisationenTable.CreatedByCol)) this.CreatedBy = source.CreatedBy; if (includedColumns.Contains(OrganisationenTable.AccessRightsIdCol)) this.AccessRightsId = source.AccessRightsId; if (includedColumns.Contains(OrganisationenTable.LastUpdateTokenCol)) this.LastUpdateToken = source.LastUpdateToken; }
/// <summary> /// This method copy's each database field which is in the <paramref name="includedColumns"/> /// from the <paramref name="source"/> interface to this data row. /// </summary> public void Copy_From_But_TakeOnly(IOrganisation source, params string[] includedColumns) { if (includedColumns.Contains(OrganisationenTable.IdCol)) this.Id = source.Id; if (includedColumns.Contains(OrganisationenTable.NameIdCol)) this.NameId = source.NameId; if (includedColumns.Contains(OrganisationenTable.BeschreibungCol)) this.Beschreibung = source.Beschreibung; if (includedColumns.Contains(OrganisationenTable.CodeNameCol)) this.CodeName = source.CodeName; if (includedColumns.Contains(OrganisationenTable.OrganisationenTypIdCol)) this.OrganisationenTypId = source.OrganisationenTypId; if (includedColumns.Contains(OrganisationenTable.OrganisationenTypNameCol)) this.OrganisationenTypName = source.OrganisationenTypName; if (includedColumns.Contains(OrganisationenTable.EMailCol)) this.EMail = source.EMail; if (includedColumns.Contains(OrganisationenTable.TelCol)) this.Tel = source.Tel; if (includedColumns.Contains(OrganisationenTable.OrtsIdCol)) this.OrtsId = source.OrtsId; if (includedColumns.Contains(OrganisationenTable.WwwCol)) this.Www = source.Www; if (includedColumns.Contains(OrganisationenTable.KontaktPersonCol)) this.KontaktPerson = source.KontaktPerson; if (includedColumns.Contains(OrganisationenTable.MaterialRootCol)) this.MaterialRoot = source.MaterialRoot; if (includedColumns.Contains(OrganisationenTable.ParentOrganisationsIdCol)) this.ParentOrganisationsId = source.ParentOrganisationsId; if (includedColumns.Contains(OrganisationenTable.WordUpRootIdCol)) this.WordUpRootId = source.WordUpRootId; if (includedColumns.Contains(OrganisationenTable.LastUpdateTokenCol)) this.LastUpdateToken = source.LastUpdateToken; }
/// <summary> This method copy's each database field into the <paramref name="target"/> interface. </summary> public void Copy_To(IOrganisation target, bool includePrimaryKey = false) { if (includePrimaryKey) target.Id = this.Id; target.Bereich = this.Bereich; target.NameId = this.NameId; target.DisplayShortName = this.DisplayShortName; target.DisplayShortAdditional = this.DisplayShortAdditional; target.Name = this.Name; target.AddOnStrings = this.AddOnStrings; target.OeffnungsZeiten = this.OeffnungsZeiten; target.TelefonO1 = this.TelefonO1; target.TelefonO2 = this.TelefonO2; target.EMailO1 = this.EMailO1; target.EMailO2 = this.EMailO2; target.WwwO = this.WwwO; target.FaxO = this.FaxO; target.YouTubeO = this.YouTubeO; target.FaceBookO = this.FaceBookO; target.WarenAngebot = this.WarenAngebot; target.OrganisationsSubTypId = this.OrganisationsSubTypId; target.OrganisationsTypId = this.OrganisationsTypId; target.AdressId = this.AdressId; target.Besonderes = this.Besonderes; target.Beschreibung = this.Beschreibung; target.Finanzielles = this.Finanzielles; target.ExterneKennung = this.ExterneKennung; target.ZVRName = this.ZVRName; target.KaufParkId = this.KaufParkId; target.MaterialConnector = this.MaterialConnector; target.ModifyTimeStamp = this.ModifyTimeStamp; target.ProcessingStatus = this.ProcessingStatus; target.LastModifiedBy = this.LastModifiedBy; target.CreatedBy = this.CreatedBy; target.AccessRightsId = this.AccessRightsId; target.LastUpdateToken = this.LastUpdateToken; }
/// <summary> This method copy's each database field from the <paramref name="source"/> interface to this data row.</summary> public void Copy_From(IOrganisation source, bool includePrimaryKey = false) { if (includePrimaryKey) this.Id = source.Id; this.NameId = source.NameId; this.Beschreibung = source.Beschreibung; this.CodeName = source.CodeName; this.OrganisationenTypId = source.OrganisationenTypId; this.OrganisationenTypName = source.OrganisationenTypName; this.EMail = source.EMail; this.Tel = source.Tel; this.OrtsId = source.OrtsId; this.Www = source.Www; this.KontaktPerson = source.KontaktPerson; this.MaterialRoot = source.MaterialRoot; this.ParentOrganisationsId = source.ParentOrganisationsId; this.WordUpRootId = source.WordUpRootId; this.LastUpdateToken = source.LastUpdateToken; }
/// <summary> This method copy's each database field from the <paramref name="source"/> interface to this data row.</summary> public void Copy_From(IOrganisation source, bool includePrimaryKey = false) { if (includePrimaryKey) this.Id = source.Id; this.Bereich = source.Bereich; this.NameId = source.NameId; this.DisplayShortName = source.DisplayShortName; this.DisplayShortAdditional = source.DisplayShortAdditional; this.Name = source.Name; this.AddOnStrings = source.AddOnStrings; this.OeffnungsZeiten = source.OeffnungsZeiten; this.TelefonO1 = source.TelefonO1; this.TelefonO2 = source.TelefonO2; this.EMailO1 = source.EMailO1; this.EMailO2 = source.EMailO2; this.WwwO = source.WwwO; this.FaxO = source.FaxO; this.YouTubeO = source.YouTubeO; this.FaceBookO = source.FaceBookO; this.WarenAngebot = source.WarenAngebot; this.OrganisationsSubTypId = source.OrganisationsSubTypId; this.OrganisationsTypId = source.OrganisationsTypId; this.AdressId = source.AdressId; this.Besonderes = source.Besonderes; this.Beschreibung = source.Beschreibung; this.Finanzielles = source.Finanzielles; this.ExterneKennung = source.ExterneKennung; this.ZVRName = source.ZVRName; this.KaufParkId = source.KaufParkId; this.MaterialConnector = source.MaterialConnector; this.ModifyTimeStamp = source.ModifyTimeStamp; this.ProcessingStatus = source.ProcessingStatus; this.LastModifiedBy = source.LastModifiedBy; this.CreatedBy = source.CreatedBy; this.AccessRightsId = source.AccessRightsId; this.LastUpdateToken = source.LastUpdateToken; }
private static IDocumentStore CreateOrgDatabase(IOrganisation organisation,IDocumentSession masterSession) { var newOrgStore = new DocumentStore { Url = organisation.Url }; if (!String.IsNullOrEmpty(organisation.ApiKey)) { newOrgStore.ApiKey = organisation.ApiKey; } newOrgStore.Initialize(); IlluminateDatabase.IndexOrgStore(newOrgStore); //TODO: Why does this not work? Is is due to no documents? MvcApplication.DataBase.AddOrgStore(organisation.OrgKey,newOrgStore); return newOrgStore; }