update headers

This commit is contained in:
Frede Hundewadt 2023-03-21 07:07:55 +01:00
parent 8a5a527788
commit 6f2079fd64
14 changed files with 313 additions and 297 deletions

View file

@ -1,13 +1,13 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 03-31-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 03-31-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="LivsforloebModel.cs" company="FCS.Lib.Virk">
// Copyright (C) 2022 FCS Frede's Computer Services.
// <copyright file="LivsforloebModel.cs" company="FCS">
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
@ -23,6 +23,7 @@
// </copyright>
// <summary></summary>
// ***********************************************************************
namespace FCS.Lib.Virk
{
/// <summary>
@ -34,6 +35,7 @@ namespace FCS.Lib.Virk
/// Last registrar update
/// </summary>
public string SidstOpdateret { get; set; } = "";
/// <summary>
/// Period
/// </summary>

View file

@ -1,28 +1,29 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="NyesteBeliggenhedsadresse.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
namespace FCS.Lib.Virk
{
/// <summary>
@ -34,22 +35,27 @@ namespace FCS.Lib.Virk
/// House number from
/// </summary>
public int? HusnummerFra { get; set; }
/// <summary>
/// House number to
/// </summary>
public int? HusnummerTil { get; set; }
/// <summary>
/// Zip code
/// </summary>
public int? Postnummer { get; set; }
/// <summary>
/// Street name
/// </summary>
public string Vejnavn { get; set; } = "";
/// <summary>
/// CO name
/// </summary>
public string CoNavn { get; set; } = "";
/// <summary>
/// Mail district name
/// </summary>

View file

@ -1,25 +1,25 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="NyesteNavn.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************

View file

@ -1,28 +1,29 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="Periode.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
namespace FCS.Lib.Virk
{
/// <summary>
@ -34,6 +35,7 @@ namespace FCS.Lib.Virk
/// Valid from
/// </summary>
public string GyldigFra { get; set; } = "";
/// <summary>
/// Valid to
/// </summary>

View file

@ -1,28 +1,29 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="VirksomhedMetadata.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
namespace FCS.Lib.Virk
{
/// <summary>
@ -35,6 +36,7 @@ namespace FCS.Lib.Virk
/// </summary>
/// <see cref="NyesteNavn"/>
public NyesteNavn NyesteNavn { get; set; } = new();
/// <summary>
/// Business current address object
/// </summary>

View file

@ -1,28 +1,29 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="VirksomhedsStatus.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
namespace FCS.Lib.Virk
{
/// <summary>
@ -34,10 +35,12 @@ namespace FCS.Lib.Virk
/// Business last updated with registrar
/// </summary>
public string SidstOpdateret { get; set; } = "";
/// <summary>
/// Business status with registrar
/// </summary>
public string Status { get; set; } = "";
/// <summary>
/// Period object
/// </summary>

View file

@ -1,25 +1,25 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="VrHttpRequest.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
@ -67,4 +67,3 @@ namespace FCS.Lib.Virk
}
}
}

View file

@ -1,28 +1,29 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="VrQuery.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
namespace FCS.Lib.Virk
{
/// <summary>
@ -34,18 +35,22 @@ namespace FCS.Lib.Virk
/// Vat number
/// </summary>
public string VatNumber { get; set; } = "";
/// <summary>
/// Street name
/// </summary>
public string StreetName { get; set; } = "";
/// <summary>
/// House number
/// </summary>
public string HouseNumber { get; set; } = "";
/// <summary>
/// Zip code
/// </summary>
public string ZipCode { get; set; } = "";
/// <summary>
/// Entity name
/// </summary>

View file

@ -1,25 +1,25 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="VrQueryMapper.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
@ -44,7 +44,6 @@ namespace FCS.Lib.Virk
{
// lookup based on address
if (string.IsNullOrWhiteSpace(query.VatNumber) && string.IsNullOrWhiteSpace(query.EntityName))
{
return new JObject(
new JProperty("_source",
new JArray(
@ -80,10 +79,8 @@ namespace FCS.Lib.Virk
new JProperty("_name", "husnummerFra"))))))
)))))),
new JProperty("size", 50));
}
// vat number query
if (string.IsNullOrWhiteSpace(query.EntityName))
{
return new JObject(
new JProperty("_source",
new JArray(
@ -103,7 +100,6 @@ namespace FCS.Lib.Virk
new JObject(new JProperty("Vrvirksomhed.cvrNummer", query.VatNumber))))
)
);
}
query.EntityName = query.EntityName.Replace("A/S", "").Trim().Replace(" ", " AND ").Replace("-", " AND ");
// name query
@ -130,7 +126,6 @@ namespace FCS.Lib.Virk
)
)),
new JProperty("size", 50));
}
}
}

View file

@ -1,28 +1,29 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="VrQueryValidator.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
namespace FCS.Lib.Virk
{
/// <summary>
@ -41,7 +42,8 @@ namespace FCS.Lib.Virk
try
{
// Precise lookup
if (!string.IsNullOrWhiteSpace(query.VatNumber) || !string.IsNullOrWhiteSpace(query.EntityName)) return true;
if (!string.IsNullOrWhiteSpace(query.VatNumber) || !string.IsNullOrWhiteSpace(query.EntityName))
return true;
// Address lookup
return !string.IsNullOrWhiteSpace(query.StreetName)
&& !string.IsNullOrWhiteSpace(query.HouseNumber)

View file

@ -1,25 +1,25 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="VrResponseParser.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
@ -54,10 +54,11 @@ namespace FCS.Lib.Virk
var cvrHits = cvrObject.SelectToken("hits")?.SelectToken("hits");
for (var i = 0; i < numHits; i++)
{
try
{
var cObject = cvrHits?[i]?["_source"] != null ? (JObject?)cvrHits[i]?["_source"]?["Vrvirksomhed"] : null;
var cObject = cvrHits?[i]?["_source"] != null
? (JObject?)cvrHits[i]?["_source"]?["Vrvirksomhed"]
: null;
var jsonString = JsonConvert.SerializeObject(cObject);
@ -69,7 +70,6 @@ namespace FCS.Lib.Virk
{
return result;
}
}
return result;
}

View file

@ -1,25 +1,25 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="VrResponseView.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
@ -37,10 +37,12 @@ namespace FCS.Lib.Virk
/// Http request status code
/// </summary>
public HttpStatusCode Code { get; set; }
/// <summary>
/// boolean value indicating success
/// </summary>
public bool IsSuccessStatusCode { get; set; }
/// <summary>
/// Service response as string
/// </summary>

View file

@ -1,25 +1,25 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="VrCvrMapper.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// <copyright file="VrVatInfoMapper.cs" company="FCS">
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
@ -58,7 +58,6 @@ namespace FCS.Lib.Virk
};
if (vrVirk.VirksomhedsStatus.Any())
{
foreach (var cs in vrVirk.VirksomhedsStatus.Select(vrStatus => new VatState
{
State = vrStatus.Status,
@ -66,20 +65,16 @@ namespace FCS.Lib.Virk
TimeFrame = new TimeFrame
{
StartDate = vrStatus.Periode.GyldigFra,
EndDate = !string.IsNullOrWhiteSpace(vrStatus.Periode.GyldigTil) ? vrStatus.Periode.GyldigTil : ""
EndDate = !string.IsNullOrWhiteSpace(vrStatus.Periode.GyldigTil)
? vrStatus.Periode.GyldigTil
: ""
}
}))
{
c.States.Add(cs);
}
}
else
{
c.States.Add(new VatState());
}
if (vrVirk.Livsforloeb.Any())
{
foreach (var lc in vrVirk.Livsforloeb.Select(
vrCourse => new LifeCycle
{
@ -87,18 +82,15 @@ namespace FCS.Lib.Virk
TimeFrame = new TimeFrame
{
StartDate = vrCourse.Periode.GyldigFra,
EndDate = !string.IsNullOrWhiteSpace(vrCourse.Periode.GyldigTil) ? vrCourse.Periode.GyldigTil : ""
EndDate = !string.IsNullOrWhiteSpace(vrCourse.Periode.GyldigTil)
? vrCourse.Periode.GyldigTil
: ""
}
}
))
{
c.LifeCycles.Add(lc);
}
}
else
{
c.LifeCycles.Add(new LifeCycle());
}
if (!string.IsNullOrWhiteSpace(c.States[c.States.Count - 1].State)) return c;
@ -107,7 +99,9 @@ namespace FCS.Lib.Virk
c.States[sc].LastUpdate = c.LifeCycles[lcc].LastUpdate;
c.States[sc].TimeFrame.StartDate = c.LifeCycles[lcc].TimeFrame.StartDate;
c.States[sc].TimeFrame.EndDate = c.LifeCycles[lcc].TimeFrame.EndDate;
c.States[sc].State = string.IsNullOrWhiteSpace(c.LifeCycles[c.LifeCycles.Count - 1].TimeFrame.EndDate) ? "NORMAL" : "LUKKET";
c.States[sc].State = string.IsNullOrWhiteSpace(c.LifeCycles[c.LifeCycles.Count - 1].TimeFrame.EndDate)
? "NORMAL"
: "LUKKET";
return c;
}
}

View file

@ -1,28 +1,29 @@
// ***********************************************************************
// Assembly : FCS.Lib.Virk
// Author : FH
// Created : 02-21-2022
// Author : inno
// Created : 2022 12 17 13:33
//
// Last Modified By : FH
// Last Modified On : 02-24-2022
// Last Modified By : inno
// Last Modified On : 2023 03 14 09:16
// ***********************************************************************
// <copyright file="VrVirksomhed.cs" company="FCS">
// Copyright (C) 2022 FCS Frede's Computer Services.
// Copyright (C) 2022-2023 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the Affero GNU General Public License as
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// Affero GNU General Public License for more details.
// GNU Affero General Public License for more details.
//
// You should have received a copy of the Affero GNU General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses]
// </copyright>
// <summary></summary>
// ***********************************************************************
namespace FCS.Lib.Virk
{
/// <summary>
@ -35,16 +36,19 @@ namespace FCS.Lib.Virk
/// Vat number
/// </summary>
public string CvrNummer { get; set; } = "";
/// <summary>
/// Status list
/// </summary>
/// <see cref="VirksomhedsStatus"/>
public List<VirksomhedsStatus> VirksomhedsStatus { get; set; } = new();
/// <summary>
/// Meta data
/// </summary>
/// <see cref="VirksomhedMetadata"/>
public VirksomhedMetadata VirksomhedMetadata { get; set; } = new();
/// <summary>
/// Company stages
/// </summary>