Exemple #1
0
            public GenericSponzorItem(FirmaEvent fe)
            {
                this.Name       = Firmy.GetJmeno(fe.ICO);
                this.Amount     = fe.AddInfoNum ?? 0;
                this.SubjectUrl = Firmy.Get(fe.ICO).GetUrlOnWebsite(false);
                this.Strana     = fe.AddInfo;

                //transaction
                if (!string.IsNullOrEmpty(fe.Zdroj) && fe.Zdroj.ToLower().StartsWith("https://www.hlidacstatu.cz/ucty/transakce/"))
                {
                    //https://www.hlidacstatu.cz/ucty/transakce/7CCEEC74486A0B58A13DE15369B3CE74
                    var res = HlidacStatu.Lib.ES.Manager.GetESClient_Ucty()
                              .Get <HlidacStatu.Lib.Data.TransparentniUcty.BankovniPolozka>(fe.Zdroj.ToLower().Replace("https://www.hlidacstatu.cz/ucty/transakce/", ""));
                    if (res.Found)
                    {
                        this.Transaction    = res.Source;
                        this.TransactionUrl = this.Transaction.GetUrl(false);
                        this.Date           = this.Transaction.Datum;
                    }
                }
                if (this.Transaction == null)
                {
                    this.Date = fe.DatumOd ?? fe.Created;
                }
            }
Exemple #2
0
 public GenericSponzorItem(OsobaEvent oe)
 {
     this.Name       = Osoba.GetByInternalId(oe.OsobaId).FullNameWithYear();
     this.Amount     = oe.AddInfoNum ?? 0;
     this.SubjectUrl = Osoba.GetByInternalId(oe.OsobaId).GetUrlOnWebsite();
     this.Strana     = oe.AddInfo;
     //transaction
     if (!string.IsNullOrEmpty(oe.Zdroj) && oe.Zdroj.ToLower().StartsWith("https://www.hlidacstatu.cz/ucty/transakce/"))
     {
         //https://www.hlidacstatu.cz/ucty/transakce/7CCEEC74486A0B58A13DE15369B3CE74
         var res = HlidacStatu.Lib.ES.Manager.GetESClient_Ucty()
                   .Get <HlidacStatu.Lib.Data.TransparentniUcty.BankovniPolozka>(oe.Zdroj.Substring("https://www.hlidacstatu.cz/ucty/transakce/".Length));
         if (res.Found)
         {
             this.Transaction    = res.Source;
             this.TransactionUrl = this.Transaction.GetUrl(false);
             this.Date           = this.Transaction.Datum;
         }
     }
     if (this.Transaction == null)
     {
         this.Date = oe.DatumOd ?? oe.Created;
     }
 }