Ejemplo n.º 1
0
 public AccountIndexViewModel(Customer customer)
 {
     CustomerId          = customer.Id;
     CustomerName        = NameModel.Create(customer);
     CustomerDateOfBirth = new DateTimeModel(customer.DateOfBirth);
     CustomerHomeAddress = new AddressViewModel(customer.HomeAddress);
 }
Ejemplo n.º 2
0
        public override NameModel CreatePackageName(HtmlNode anchor, HttpModel httpGet)
        {
            // example: https://www.ris.bka.gv.at/Dokument.wxe?ResultFunctionToken=8df6bc29-1253-484d-a41d-5db518f80b23&Abfrage=Bvwg&Entscheidungsart=Undefined&SucheNachRechtssatz=True&SucheNachText=True&GZ=&VonDatum=01.01.2014&BisDatum=14.05.2019&Norm=&ImRisSeitVonDatum=&ImRisSeitBisDatum=&ImRisSeit=Undefined&ResultPageSize=100&Suchworte=&Dokumentnummer=BVWGT_20190502_W170_2208106_1_00

            var documentNumber = new Uri(anchor.Href()).GetQueryFragmentsMap()["Dokumentnummer"];

            return NameModel.Create(documentNumber);
        }
Ejemplo n.º 3
0
 public override NameModel CreatePackageDocumentName(HtmlNode anchor, HttpModel httpGet)
 {
     if (IsCasePage(anchor))
     {
         return(NameModel.Create("detail"));
     }
     else if (IsJudgmentPdf(anchor))
     {
         return(NameModel.Create("content"));
     }
     else if (IsPressSummaryPdf(anchor))
     {
         return(NameModel.Create("presssummary"));
     }
     else
     {
         throw new ArgumentException($"Unknown anchor pattern for package document name. Url {anchor.Href()}");
     }
 }
Ejemplo n.º 4
0
        public override NameModel CreatePackageName(HtmlNode anchor, HttpModel httpGet)
        {
            // example: https://eur-lex.europa.eu/legal-content/BG/TXT/HTML/?uri=CELEX:32015R0848&qid=1557822576221&from=EN

            var twoLetterLang = this.GetTwoLetterLanguage(httpGet, anchor);

            if (TryGetCelexFromUrl(anchor.Href()) is String celex)
            {
                if (celex.StartsWith("8"))
                {
                    return(NameModel.Create(celex.Replace("(", "_").Replace(")", String.Empty)));
                }
                else
                {
                    return(NameModel.Create($"{celex}_{twoLetterLang}"));
                }
            }
            else
            {
                throw new ArgumentException($"Could not package name from: {anchor.Href()}");
            }
        }
Ejemplo n.º 5
0
 public override NameModel CreatePackageDocumentName(HtmlNode anchor, HttpModel httpGet)
 {
     return NameModel.Create("content");
 }