Example #1
0
        public static HttpPostedFileBase Create(AvtaleInfoMidlertidlig aInfo)
        {
            var templateText = Maltekst.HentMalTekst("ArbeidsavtaleNyeNarvikMidlertidlig");
            var html         = string.Format(templateText, aInfo.Navn, aInfo.Personnr, aInfo.Arbeidssted, aInfo.TittelStilling, aInfo.Hjemmel, aInfo.Sluttdato, aInfo.Prosent, aInfo.Provetid, aInfo.ProvetidUtloper, aInfo.Lonn, aInfo.Annet, aInfo.TimerPrUke);

            return(MakePdf(html.Replace("%$", "{").Replace("$%", "}")));
        }
Example #2
0
        public static HttpPostedFileBase Create(AvtaleInfo aInfo)
        {
            var templateText = Maltekst.HentMalTekst("ArbeidsavtaleNyeNarvikFast");
            var html         = string.Format(templateText, aInfo.Navn, aInfo.Personnr, aInfo.Arbeidssted, aInfo.TittelStilling, aInfo.Prosent, aInfo.Lonn, aInfo.Annet);

            //var html = string.Format(templateText, "Test Hansen", "01020399199", "HR PERSONAL", "8530 Rådgiver", "100.0", "500000.00", "");
            return(MakePdf(html.Replace("%$", "{").Replace("$%", "}")));
        }
        public static HttpPostedFileBase Create(string ansattnavn, string personnr, string formaal, string stilling, string stillingstype, string oppdragsgiver, string kontaktinfo, string stedDato)
        {
            var templateText = Maltekst.HentMalTekst("VedleggTilSøknadOmPolitiattest");

            var htmlNotat = string.Format(templateText, ansattnavn, personnr, formaal, stilling, stillingstype, LovhjemmelListe.Where(f => f.Navn.Equals(formaal)).FirstOrDefault().Hjemmel, oppdragsgiver, kontaktinfo, stedDato);

            var pdfBytes = new NReco.PdfGenerator.HtmlToPdfConverter().GeneratePdf(htmlNotat); // lag pdf-filen

            return(new NotatFil(pdfBytes, ""));
        }