Пример #1
0
 public static Word.Document AdressNameFl(Word.Document word, AdressNameFl adressnamefl)
 {
     try
     {
         word.Bookmarks["Adressfl"].Range.Text = adressnamefl.Fn212.FN213.N320;
         word.Bookmarks["Namefl"].Range.Text   = adressnamefl.Fn212.N18;
         word.Bookmarks["Nameot"].Range.Text   = adressnamefl.Fn212.FN213.Uvaz;
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
     return(word);
 }
Пример #2
0
        public static Word.Document ReportWordsGenerate(Word.Document doc, string name, XmlReader read)
        {
            switch (name)
            {
            case "Adress":
                XmlSerializer serializeradress = new XmlSerializer(typeof(Adress));
                Adress        adresorg         = (Adress)serializeradress.Deserialize(read);
                doc = GenerateWord.AdressOrg(doc, adresorg);
                return(doc);

            case "Name":
                XmlSerializer serializernameorg = new XmlSerializer(typeof(NameOrg));
                NameOrg       nameorg           = (NameOrg)serializernameorg.Deserialize(read);
                doc = GenerateWord.NameOrg(doc, nameorg);
                return(doc);

            case "Summ":
                XmlSerializer serializersummorg = new XmlSerializer(typeof(SummOrg));
                SummOrg       summorg           = (SummOrg)serializersummorg.Deserialize(read);
                doc = GenerateWord.SummOrg(doc, summorg);
                return(doc);

            case "GetDate":
                XmlSerializer serializernameorgdatazapr = new XmlSerializer(typeof(Dates));
                Dates         datazapr = (Dates)serializernameorgdatazapr.Deserialize(read);
                doc = GenerateWord.DataZapr(doc, datazapr);
                return(doc);

            case "FlAdressName":
                XmlSerializer serializeradressnamefl = new XmlSerializer(typeof(AdressNameFl));
                AdressNameFl  adresfnamefl           = (AdressNameFl)serializeradressnamefl.Deserialize(read);
                doc = GenerateWord.AdressNameFl(doc, adresfnamefl);
                return(doc);

            case "Ndfl":
                XmlSerializer serializerndfl = new XmlSerializer(typeof(NdflFl));
                NdflFl        declarfl       = (NdflFl)serializerndfl.Deserialize(read);
                doc = GenerateWord.DeclarNdfl(doc, declarfl);
                return(doc);

            default:
                return(null);
            }
        }