Пример #1
0
 private void CreateDocumentation(String FileName)
     {
     if (DocumentationForPrintouts.Keys.Count == 0)
         {
         DocumentationForPrintouts["TMT"] = "Termine mit den einzuladenden Teilnehmern (Terminübersichten)";
         DocumentationForPrintouts["O"] = "Liste der beteiligten Organisationen";
         DocumentationForPrintouts["P"] = "Liste der beteiligten Personen";
         DocumentationForPrintouts["PMT"] = "Personen mit deren Terminen (Terminübersicht pro Person)";
         DocumentationForPrintouts["TIO"] =
             "Termine, die in Organisationen abgehalten werden (Was geschieht Wo und Wann)";
         DocumentationForPrintouts["TVO"] =
             "Organisationen mit deren Personen und mit deren Terminen (Welche Organisation entsendet Ihre Mitarbeiter Wann Wohin)";
         }
     DocumentPrintOut Writer = new DocumentPrintOut(FileName, false);
     foreach (String Doc in DocumentationForPrintouts.Keys)
         Writer.WriteLine(Doc + "\t" + DocumentationForPrintouts[Doc]);
     Writer.Close();
     }
Пример #2
0
        private void CreateProjectPrintoutforWholeTableWithCummulatedOrtsBezeichnung(DataTable SortableProjekte,
            String FileName,
            List<System.Guid>
                UpdatedSinceLastCheckPoint,
            bool ChangedOrUnChanged,
            String Description,
            bool BreakByArbeitsGruppenNameID = true,
            bool BreakByZustaendig = true,
            bool BreakByOrtsTeil = true,
            bool BreakByOrtsBezeichnung = true,
            bool WithOrWithoutPlakate = true,
            bool WithOrWithoutActivities = true,
            String PrintThisSecurityGroup = "ProfisFull")
            {
            DocumentPrintOut.ActuallOutputType = DocumentPrintOut.OutputType.RTFDocument;
            DocumentPrintOut ProjectWriter = new DocumentPrintOut(FileName, false);
            if (WithOrWithoutActivities == true)
                ProjectWriter.PrintThisSecurityGroup = PrintThisSecurityGroup;
            if (WithOrWithoutPlakate == true)
                ProjectWriter.WithOrWithoutPlakate = WithOrWithoutPlakate;
            if (String.IsNullOrEmpty(Description) == false)
                {
                ProjectWriter.WriteLine(DocumentPrintOut.ElementType.ContentLevel1, Description,
                    "0, 0, 0, 0", 0);
                }

            String OldArbeitsGruppenNameID = String.Empty;
            bool PageBreakHasBeenSetBefore = false;
            String OldOrtsTeil = String.Empty;
            String OldZustaendig = String.Empty;
            String OldOrteBezeichnung = String.Empty;
            int RunningNumber = 0;
            foreach (DataRow ProjectEntry in SortableProjekte.Rows)
                {
                PageBreakHasBeenSetBefore = false;
                if ((BreakByArbeitsGruppenNameID == true)
                    && (OldArbeitsGruppenNameID != ProjectEntry["ArbeitsGruppenNameID"].ToString()))
                    {
                    OldArbeitsGruppenNameID = ProjectEntry["ArbeitsGruppenNameID"].ToString();
                    if (PageBreakHasBeenSetBefore == false)
                        {
                        PageBreakHasBeenSetBefore = true;
                        if (!String.IsNullOrEmpty(OldArbeitsGruppenNameID))
                            ProjectWriter.InsertPageBreak();
                        }
                    if (String.IsNullOrEmpty(OldArbeitsGruppenNameID))
                        ProjectWriter.WriteLine(DocumentPrintOut.ElementType.Heading1,
                            "Arbeitsgruppe dzt. noch nicht definiert",
                            "0, 0, 0, 0", -0);
                    else
                        ProjectWriter.WriteLine(DocumentPrintOut.ElementType.Heading1, OldArbeitsGruppenNameID,
                            "0, 0, 0, 0", 0);
                    OldOrtsTeil = String.Empty;
                    }
                if ((BreakByOrtsTeil == true)
                    && (OldOrtsTeil != ProjectEntry["OrtsTeil"].ToString()))
                    {
                    OldOrtsTeil = ProjectEntry["OrtsTeil"].ToString();
                    if (PageBreakHasBeenSetBefore == false)
                        {
                        PageBreakHasBeenSetBefore = true;
                        ProjectWriter.InsertPageBreak();
                        }
                    if (String.IsNullOrEmpty(OldOrtsTeil))
                        ProjectWriter.WriteLine(DocumentPrintOut.ElementType.Heading1,
                            "Ortsteil dzt. noch nicht definiert",
                            "0, 0, 0, 0", -0);
                    else
                        ProjectWriter.WriteLine(DocumentPrintOut.ElementType.Heading1, OldOrtsTeil,
                            "0, 0, 0, 0", 0);
                    OldZustaendig = String.Empty;
                    OldOrteBezeichnung = String.Empty;
                    }
                if ((BreakByOrtsBezeichnung == true)
                    && (OldOrteBezeichnung != DataWrapper.Instance.GetOrteBezeichnung(ProjectEntry)))
                    {
                    OldOrteBezeichnung = DataWrapper.Instance.GetOrteBezeichnung(ProjectEntry);
                    ProjectWriter.InsertEmptyLine();
                    if (String.IsNullOrEmpty(OldOrteBezeichnung))
                        ProjectWriter.WriteLine(DocumentPrintOut.ElementType.ContentLevel1,
                            "Ort dzt. noch nicht definiert",
                            "10, 0, 0, 0", -5);
                    else
                        ProjectWriter.WriteLine(DocumentPrintOut.ElementType.ContentLevel1, OldOrteBezeichnung,
                            "10, 0, 0, 0", -5);
                    OldZustaendig = String.Empty;
                    }
                if ((BreakByZustaendig == true)
                    && (OldZustaendig != ProjectEntry["ZustaendigID"].ToString()))
                    {
                    OldZustaendig = ProjectEntry["ZustaendigID"].ToString();
                    if (PageBreakHasBeenSetBefore == false)
                        {
                        PageBreakHasBeenSetBefore = true;
                        ProjectWriter.InsertPageBreak();
                        }
                    ProjectWriter.WriteLine(DocumentPrintOut.ElementType.Heading2,
                        Basics.Instance.Zustaendig[OldZustaendig.ToLower()]["Beschreibung"].ToString(),
                        "20, 0, 0, 0", -10);
                    }
                if (UpdatedSinceLastCheckPoint != null)
                    {
                    if (UpdatedSinceLastCheckPoint.Contains((System.Guid) ProjectEntry["ID"]) == ChangedOrUnChanged)
                        ProcessOneProjectToPrintout(ProjectWriter, ProjectEntry["ID"].ToString(),
                            DocumentPrintOut.ElementType.ProjektDatenOhneOrtsBezeichnung, WithOrWithoutPlakate,
                            WithOrWithoutActivities);
                    }
                else
                    {
                    ProcessOneProjectToPrintout(ProjectWriter, ProjectEntry["ID"].ToString(),
                        DocumentPrintOut.ElementType.ProjektDatenOhneOrtsBezeichnung, WithOrWithoutPlakate,
                        WithOrWithoutActivities);
                    }
                }
            ProjectWriter.Close();
            }
Пример #3
0
 private void CreateParticipantsList(DocumentPrintOut Writer, String TermineID,
     bool FullOrFirstNameOnly, List<System.Guid> AllPersonen)
     {
     DataTable TeilnehmerTable =
         WordUpWCFAccess.GetCommonDataSet("Select * from PersonenZuTermine where TermineID = '"
                                          + TermineID + "'").Tables["PersonenZuTermine"];
     List<System.Guid> AllPersonenForThisTermin = new List<Guid>();
     List<String> TeilnehmerEntries = new List<string>();
     foreach (DataRow TeilnehmerRow in TeilnehmerTable.Rows)
         {
         if (AllPersonen.Contains((System.Guid) TeilnehmerRow["PersonenID"]))
             if (AllPersonenForThisTermin.Contains((System.Guid) TeilnehmerRow["PersonenID"]) == false)
                 AllPersonenForThisTermin.Add((System.Guid) TeilnehmerRow["PersonenID"]);
         if (FullOrFirstNameOnly == false)
             TeilnehmerEntries.Add(Basics.Instance.Personen[TeilnehmerRow["PersonenID"].ToString()]
                 ["VorName"].ToString());
         else
             {
             List<String> FullTeilnehmerParts = new List<string>();
             FullTeilnehmerParts.Add(Basics.Instance.Personen[TeilnehmerRow["PersonenID"].ToString()]
                 ["NameID"].ToString());
             FullTeilnehmerParts.Add(Basics.Instance.Personen[TeilnehmerRow["PersonenID"].ToString()]
                 ["eMail"].ToString());
             FullTeilnehmerParts.Add(Basics.Instance.Personen[TeilnehmerRow["PersonenID"].ToString()]
                 ["Telefon"].ToString());
             String OrganisationID = Basics.Instance.Personen[TeilnehmerRow["PersonenID"].ToString()]
                 ["OrganisationID"].ToString();
             FullTeilnehmerParts.Add(Basics.Instance.Organisationen[OrganisationID]["Beschreibung"].ToString());
             TeilnehmerEntries.Add(String.Join("\t", FullTeilnehmerParts));
             }
         }
     if (FullOrFirstNameOnly == false)
         {
         if (AllPersonenForThisTermin.Count == AllPersonen.Count)
             Writer.WriteLine(DocumentPrintOut.ElementType.TerminAttendee, "Alle");
         else
             Writer.WriteLine(DocumentPrintOut.ElementType.TerminAttendee, String.Join(", ", TeilnehmerEntries));
         }
     else
         {
         if (AllPersonenForThisTermin.Count == AllPersonen.Count)
             Writer.WriteLine(DocumentPrintOut.ElementType.TerminAttendee, "Alle");
         else
             foreach (String Teilnehmer in TeilnehmerEntries)
                 {
                 Writer.WriteLine(DocumentPrintOut.ElementType.TerminAttendee, Teilnehmer);
                 }
         }
     }
Пример #4
0
 private void WriteHeadInfo(DocumentPrintOut Writer, List<String> TypListToSelect)
     {
     Writer.WriteLine(DocumentPrintOut.ElementType.Heading2, "Selektiert werden folgende Einträge:");
     foreach (String Entry in Basics.Instance.GetTypSelectReadableString(TypListToSelect))
         {
         Writer.WriteLine(DocumentPrintOut.ElementType.ContentLevel1, Entry);
         }
     Writer.InsertEmptyLine();
     }
Пример #5
0
        private void CreatePersonen(List<String> TypListToSelect,
            DocumentPrintOut FileToWriteTo)
            {
            String TypSelectPart = Data.DbServer3.WordUp.Typen.TypSelectionString(TypListToSelect, "PersonenTypID");
            String PersonenSelectStatement = "Select * from PersonenOrganisationenOrte where ID in "
                                             + "(Select PersonenID from PersonenZuWordUpID where WordUpID = '"
                                             + Basics.Instance.WordUpID + "') and " + TypSelectPart +
                                             " order by FamilienName";
            DataTable PersonenTable =
                WordUpWCFAccess.GetCommonDataSet(PersonenSelectStatement).Tables["PersonenOrganisationenOrte"];
            foreach (DataRow PersonenRow in PersonenTable.Rows)
                {
                //List<String> Elements = new List<string> ();

                //Elements.Add (PersonenRow ["NameID"].ToString ());
                //Elements.Add (PersonenRow ["Beschreibung"].ToString ());
                //Elements.Add (PersonenRow ["eMail"].ToString ());
                //Elements.Add (PersonenRow ["Telefon"].ToString ());

                FileToWriteTo.WriteData(PersonenRow, DocumentPrintOut.ElementType.FullPersonenDaten);
                }
            }
Пример #6
0
        private void CreateOrganisationen(List<String> TypListToSelect,
            String FileName)

            {
            String TypSelectPart = Data.DbServer3.WordUp.Typen.TypSelectionString(TypListToSelect, "OrganisationenTypID");
            String OrganisationenSelectStatement = "Select * from Organisationen where ID in "
                                                   +
                                                   "(Select OrganisationenID from OrganisationenZuWordUpID where WordUpID = '"
                                                   + Basics.Instance.WordUpID + "')  and " + TypSelectPart +
                                                   " order by Typ, Beschreibung";
            DataTable OrganisationenTable =
                WordUpWCFAccess.GetCommonDataSet(OrganisationenSelectStatement).Tables["Organisationen"];
            DocumentPrintOut Writer = new DocumentPrintOut(FileName, false);
            WriteHeadInfo(Writer, TypListToSelect);
            foreach (DataRow OrganisationenRow in OrganisationenTable.Rows)
                {
                List<String> Elements = new List<string>();

                Elements.Add(OrganisationenRow["Beschreibung"].ToString());
                Elements.Add(OrganisationenRow["KontaktPerson"].ToString());
                Elements.Add(OrganisationenRow["eMail"].ToString());
                Elements.Add(OrganisationenRow["Tel"].ToString());

                Writer.WriteLine(String.Join("\v", Elements));
                }
            Writer.Close();
            }
Пример #7
0
        private void CreatePersonenMitTerminen(List<String> TypListToSelect,
            String FileName)
            {
            String TypSelectPart = Data.DbServer3.WordUp.Typen.TypSelectionString(TypListToSelect, "PersonenTypID");
            String PersonenSelectStatement = "Select * from PersonenOrganisationenOrte where ID in "
                                             + "(Select PersonenID from PersonenZuWordUpID where WordUpID = '"
                                             + Basics.Instance.WordUpID + "')  and " + TypSelectPart +
                                             " order by FamilienName";
            DataTable PersonenTable =
                WordUpWCFAccess.GetCommonDataSet(PersonenSelectStatement).Tables["PersonenOrganisationenOrte"];
            DocumentPrintOut Writer = new DocumentPrintOut(FileName, false);
            WriteHeadInfo(Writer, TypListToSelect);
            foreach (DataRow PersonenRow in PersonenTable.Rows)
                {
                List<String> Elements = new List<string>();

                Elements.Add(PersonenRow["NameID"].ToString());
                Elements.Add(PersonenRow["OrganisationenBeschreibung"].ToString());
                Elements.Add(PersonenRow["eMail"].ToString());
                Elements.Add(PersonenRow["Telefon"].ToString());

                DataTable TermineProPerson = WordUpWCFAccess.GetCommonDataSet
                    ("Select * from TermineZuFullPersonen where PersonenID = '"
                     + PersonenRow["ID"].ToString() + "' and WordUpRootID = '" + Basics.Instance.WordUpID
                     + "' order by Von").Tables["TermineZuFullPersonen"];
                if (TermineProPerson.Rows.Count == 0)
                    continue;
                String PersonenFileName = FileName.Replace
                    (".txt", "_" + PersonenRow["NameID"].ToString().Replace(" ", "_") + ".txt");
                DocumentPrintOut PersonenWriter = new DocumentPrintOut(PersonenFileName, false);
                Writer.WriteLine(String.Join("\t", Elements));
                PersonenWriter.WriteLine(String.Join("\t", Elements));
                foreach (DataRow TerminRow in TermineProPerson.Rows)
                    {
                    List<String> TerminElements = WordUp23.Basics.GetTerminEntries(TerminRow);
                    TerminElements.Add(Basics.Instance.GetTypeBeschreibung(TerminRow["TermineTypID"].ToString()));

                    TerminElements.Add(Basics.Instance.Orte[TerminRow["OrteID"].ToString()]["NameID"].ToString());
                    String TerminEntry = "\t" + String.Join(", ", TerminElements);
                    Writer.WriteLine("\t" + String.Join(", ", TerminElements));
                    PersonenWriter.WriteLine("\t" + String.Join(", ", TerminElements));
                    }
                PersonenWriter.Close();
                }
            Writer.Close();
            }
Пример #8
0
        public FlowDocumentBasis (DataRow InputRowParameter, Section ElementSectionParameter,
            DocumentPrintOut.ElementType LogicalElementTypeParameter)
            {
            ElementSection = ElementSectionParameter;
            InputRow = InputRowParameter;
            LogicalElementType = LogicalElementTypeParameter;
            switch (DocumentPrintOut.ActuallOutputType)
                {
                    case DocumentPrintOut.OutputType.TabDelimitedFile:
                        switch (LogicalElementType)
                            {
                                case DocumentPrintOut.ElementType.FullPersonenDaten:
                                    HeadLine = String.Join ("\t", GetItemList (InputRowParameter,
                                        new List<String>() { "NameID", "OrganisationenBeschreibung", "eMail", "Telefon" }));
                                    break;
                                case DocumentPrintOut.ElementType.SimpleTerminDaten:
                                    {
                                    HeadLine = String.Join ("\t", GetSimpleTerminDaten (InputRowParameter));
                                    break;
                                    }
                            }
                        break;
                    case DocumentPrintOut.OutputType.RTFDocument:
                        {
                        switch (LogicalElementType)
                            {
                                case DocumentPrintOut.ElementType.FullPersonenDaten:
                                    {
                                    List<String> PersonenItems = GetItemList (InputRowParameter,
                                        new List<String> () { "NameID", "OrganisationenBeschreibung", "eMail", "Telefon" });

                                    ElementSection = new Section ();
                                    Table PersonenTable = GetStandardTable (1);
                                    ElementSection.Blocks.Add (PersonenTable);
                                    Paragraph NameCell = new Paragraph (new Bold (new Run (PersonenItems [0])));
                                    NameCell.FontSize = 14;
                                    Paragraph DatenCell = new Paragraph (new Run (PersonenItems [1] + ", "
                                                                                  + PersonenItems [2] + ", " + PersonenItems [3]));
                                    TableRow CurrentRow = PersonenTable.RowGroups [0].Rows [0];
                                    CurrentRow.Cells.Add (new TableCell (NameCell));
                                    CurrentRow.Cells.Add (new TableCell (DatenCell));

                                    break;
                                    }
                                case DocumentPrintOut.ElementType.SimpleTerminDaten:
                                    {
                                    List<String> TerminDaten = GetSimpleTerminDaten (InputRowParameter);
                                    Paragraph TerminParagraph = new Paragraph (new Bold (new Run (TerminDaten [0] + " " + TerminDaten [1])));
                                    Paragraph Zusatz = new Paragraph (new Run (TerminDaten [2] + " " + TerminDaten [3]));
                                    Table AdressenTable = GetStandardTable (1);
                                    AdressenTable.RowGroups [0].Rows [0].Cells.Add (new TableCell (TerminParagraph));
                                    AdressenTable.RowGroups [0].Rows [0].Cells.Add (new TableCell (Zusatz));
                                    ElementSection = new Section ();
                                    ElementSection.Blocks.Add (AdressenTable);

                                    break;
                                    }
                            }
                        break;
                        }
                    case DocumentPrintOut.OutputType.HTMLPage:
                        {
                        break;
                        }
                }

            }
Пример #9
0
        private void CreateTermineVonOrganisationen(List<String> TypListToSelect,
            String FileName)
            {
            String TypSelectPart = Data.DbServer3.WordUp.Typen.TypSelectionString(TypListToSelect, "OrganisationenTypID");
            String OrganisationenSelectStatement = "Select * from Organisationen where ID in "
                                                   +
                                                   "(Select OrganisationenID from OrganisationenZuWordUpID where WordUpID = '"
                                                   + Basics.Instance.WordUpID + "')  and " + TypSelectPart +
                                                   " order by NameID";
            DataTable OrganisationenTable =
                WordUpWCFAccess.GetCommonDataSet(OrganisationenSelectStatement).Tables["Organisationen"];
            DocumentPrintOut Writer = new DocumentPrintOut(FileName, false);
            foreach (DataRow OrganisationenRow in OrganisationenTable.Rows)
                {
                double MinutenProOrganisation = 0;
                List<String> Elements = new List<string>();

                Elements.Add(OrganisationenRow["Beschreibung"].ToString());
                Elements.Add(OrganisationenRow["KontaktPerson"].ToString());
                Elements.Add(OrganisationenRow["eMail"].ToString());
                Elements.Add(OrganisationenRow["Tel"].ToString());

                DataTable MitarbeiterProOrganisation = WordUpWCFAccess.GetCommonDataSet
                    ("Select * from Personen where OrganisationID = '"
                     + OrganisationenRow["ID"].ToString() + "' order by FamilienName").Tables["Personen"];
                if (MitarbeiterProOrganisation.Rows.Count == 0)
                    continue;
                Writer.WriteLine(DocumentPrintOut.ElementType.Heading2, String.Join("\t", Elements));

                foreach (DataRow PersonenRow in MitarbeiterProOrganisation.Rows)
                    {
                    double MinutenProMitarbeiter = 0;
                    List<String> PersonenElements = new List<string>();

                    PersonenElements.Add(PersonenRow["NameID"].ToString());
                    PersonenElements.Add(PersonenRow["eMail"].ToString());
                    PersonenElements.Add(PersonenRow["Telefon"].ToString());

                    DataTable TermineProPerson = WordUpWCFAccess.GetCommonDataSet
                        ("Select * from TermineZuFullPersonen where PersonenID = '"
                         + PersonenRow["ID"].ToString() + "' and WordUpRootID = '" + Basics.Instance.WordUpID
                         + "' order by Von").Tables["TermineZuFullPersonen"];
                    if (TermineProPerson.Rows.Count == 0)
                        continue;
                    Writer.WriteLine(DocumentPrintOut.ElementType.ContentLevel1, String.Join("\t", PersonenElements));
                    foreach (DataRow TerminRow in TermineProPerson.Rows)
                        {
                        List<String> TerminElements = WordUp23.Basics.GetTerminEntries(TerminRow);
                        MinutenProMitarbeiter += WordUp23.Basics.GetDurationInMinutes(TerminRow);
                        MinutenProOrganisation += WordUp23.Basics.GetDurationInMinutes(TerminRow);
                        TerminElements.Add(Basics.Instance.Orte[TerminRow["OrteID"].ToString()]["NameID"].ToString());
                        Writer.WriteLine(DocumentPrintOut.ElementType.ContentLevel2, String.Join(", ", TerminElements));
                        }
                    Writer.WriteLine((String.Empty));
                    Writer.WriteLine(DocumentPrintOut.ElementType.ContentLevel1,
                        String.Format("GesamtStunden für " + PersonenRow["NameID"].ToString()
                                      + " = {0}", TimeSpan.FromMinutes(MinutenProMitarbeiter).TotalHours));
                    Writer.WriteLine((String.Empty));
                    }
                Writer.WriteLine((String.Empty));
                Writer.WriteLine(DocumentPrintOut.ElementType.ContentLevel1,
                    String.Format("GesamtStunden für " + OrganisationenRow["Beschreibung"].ToString()
                                  + " = {0}", TimeSpan.FromMinutes(MinutenProOrganisation).TotalHours));
                Writer.WriteLine((String.Empty));
                }
            Writer.Close();
            }
Пример #10
0
        private void CreateTermineInOrganisationen(List<String> TypListToSelect,
            String FileName)
            {
            String TypSelectPart = Data.DbServer3.WordUp.Typen.TypSelectionString(TypListToSelect, "OrganisationenTypID");
            String OrganisationenSelectStatement = "Select * from OrganisationenMitOrte where ID in "
                                                   + "(Select PersonenID from PersonenZuWordUpID where WordUpID = '"
                                                   + Basics.Instance.WordUpID + "')  and " + TypSelectPart +
                                                   " order by NameID";
            DataTable OrganisationenTable =
                WordUpWCFAccess.GetCommonDataSet(OrganisationenSelectStatement).Tables["OrganisationenMitOrte"];
            DocumentPrintOut Writer = new DocumentPrintOut(FileName, false);
            WriteHeadInfo(Writer, TypListToSelect);
            foreach (DataRow OrganisationenRow in OrganisationenTable.Rows)
                {
                List<String> Elements = new List<string>();

                Elements.Add(OrganisationenRow["Beschreibung"].ToString());
                Elements.Add(OrganisationenRow["KontaktPerson"].ToString());
                Elements.Add(OrganisationenRow["eMail"].ToString());
                Elements.Add(OrganisationenRow["Tel"].ToString());

                DataTable TermineProOrt = WordUpWCFAccess.GetCommonDataSet
                    ("Select * from TerminPlan where OrteID = '"
                     + OrganisationenRow["OrtsID"].ToString() + "' and WordUpRootID = '" + Basics.Instance.WordUpID
                     + "' order by Von").Tables["TerminPlan"];
                if (TermineProOrt.Rows.Count == 0)
                    continue;
                Writer.WriteLine(DocumentPrintOut.ElementType.Heading2, String.Join("\t", Elements));
                foreach (DataRow TerminRow in TermineProOrt.Rows)
                    {
                    List<String> TerminElements = WordUp23.Basics.GetTerminEntries(TerminRow);
                    TerminElements.Add(Basics.Instance.GetTypeBeschreibung(TerminRow["TermineTypID"].ToString()));

                    Writer.WriteLine(DocumentPrintOut.ElementType.ContentLevel1, String.Join("\t", TerminElements));

                    DataTable TeilnehmerTable =
                        WordUpWCFAccess.GetCommonDataSet("Select * from PersonenZuTermine where TermineID = '"
                                                         + TerminRow["ID"].ToString() + "'").Tables[
                                                             "PersonenZuTermine"];
                    if (TeilnehmerTable.Rows.Count == 0)
                        continue;
                    foreach (DataRow TeilnehmerRow in TeilnehmerTable.Rows)
                        {
                        List<String> TeilnehmerEntries = new List<string>();
                        TeilnehmerEntries.Add(Basics.Instance.Personen[TeilnehmerRow["PersonenID"].ToString()]
                            ["NameID"].ToString());
                        TeilnehmerEntries.Add(Basics.Instance.Personen[TeilnehmerRow["PersonenID"].ToString()]
                            ["eMail"].ToString());
                        TeilnehmerEntries.Add(Basics.Instance.Personen[TeilnehmerRow["PersonenID"].ToString()]
                            ["Telefon"].ToString());
                        Writer.WriteLine(DocumentPrintOut.ElementType.ContentLevel2,
                            String.Join("\t", TeilnehmerEntries));
                        }
                    }
                }
            Writer.Close();
            }
Пример #11
0
        private void RunAllAuswertungen(String TargetDirectoryPath,
            DocumentPrintOut.OutputType OutputType = DocumentPrintOut.OutputType.RTFDocument)
            {
            if (!Directory.Exists(TargetDirectoryPath))
                Directory.CreateDirectory(TargetDirectoryPath);
            CreateDocumentation(System.IO.Path.Combine(TargetDirectoryPath, "BeschreibungDerDarstellungen.txt"));

            //	new List<String>() { "ACAC820B-309A-4EE1-8B8B-3B07E857D542",
            //												"4996B8A5-997C-4506-839C-6079CE61C7FB", 
            //												"3BD67A2A-2A76-4D70-9001-2EAB6EDC192F",
            //}, // Film, VB_Plenum, Öff_Vorbereitung
            CreateeMailsForTerminAndParticipant(Basics.Instance.GetIDsWithSpecialTyp("Termine", "Erinnern"),
                System.IO.Path.Combine(TargetDirectoryPath, "TMT-FilmTermine.txt"));

            return;
            /*
                        #region Depricated

                        CreateeMailsForTerminAndParticipant(new List<String>() {"93c201e5-d103-49c9-b66d-cbb4ab71943c"}, // Trailer
                            System.IO.Path.Combine(TargetDirectoryPath, "TMT-TrailerTermine.txt"));
                        CreateeMailsForTerminAndParticipant(new List<String>() {"fb30624a-dea9-4981-91df-9072a2bbe417"}, // WS
                            System.IO.Path.Combine(TargetDirectoryPath, "TMT-WSTermine.txt"));
                        CreateeMailsForTerminAndParticipant(new List<String>()
                            {
                            "c4e65101-3629-47af-8e8c-7712c301ffb6", //Abschlußplenum
                            "b4b9462b-30b4-4a8f-a477-d19bf68afd21", // "Vorbereitung Frühjahrstreffen",
                            "b1b99778-4740-4d4b-88c9-e6e5c6a56602", // "Frühjahrstreffen
                            "ebf726d5-afb1-42de-9519-7f2f4c00d7f8", // "Kids und Team Reflexionstreffen",
                            "52402c38-0935-47f0-98c6-91b0739a1886", //"Plenum",
                            "8a8c3156-9bfa-449c-8f2a-44428b21dcf7", //"Team Reflexionstreffen",
                            "623db133-bf27-4c8f-8b63-784587c23571", //"Vorbereitung Abschlussplenum",
                            "4090e2fd-da63-4085-bc9b-dc4b152aeeb0", //"Vorbereitung Workshops",
                            "b4b9462b-30b4-4a8f-a477-d19bf68afd21", //"Vorbereitung Frühjahrstreffen",
                            "4996b8a5-997c-4506-839c-6079ce61c7fb", //"Vorbereitung Plenum",
                            "665dc71d-5d97-455c-a2ff-6c0ba6243369", //"Vorbereitung Vorbereitungstreffen",
                            "f5c964fa-501d-48a9-9fb3-798000e8163e", //"Vorbereitung Reflexionstreffen",
                            "d37ead54-6452-40eb-b366-eb4ce93f61be", //"Vorbereitungstreffen",
                            "f61d9cb1-59a4-430b-ad67-ebdcc5df1d11" //"Vorschlag"
                            },
                            System.IO.Path.Combine(TargetDirectoryPath, "TMT-SonstigeTermine.txt"));

                        CreateOrganisationen(new List<String>() {"12fef143-5dab-4d76-8aa0-e0f20cfe54cb"}, // Schule
                            System.IO.Path.Combine(TargetDirectoryPath, "O-SchulenOrganisationen.txt"));
                        CreateOrganisationen(new List<String>()
                            {
                            "f3e261d7-ada9-4421-802a-ae8bd30ce74c",
                            "d8577109-5915-4627-927f-4425a6196a15",
                            "79b0f565-6a5b-40d9-8575-eef9be756ab9"
                            }, // "Amt", "RSB", "ProjektLeitung"
                            System.IO.Path.Combine(TargetDirectoryPath, "O-AmtOrganisationen.txt"));
                        CreateOrganisationen(new List<String>() {"3a1b5101-b19f-4f24-aa77-2e46edfe578b"}, //	"Jugend"
                            System.IO.Path.Combine(TargetDirectoryPath, "O-JugendOrganisationen.txt"));
                        CreateOrganisationen(Basics.Instance.GetAllIDSForUsageTable("Organisationen"),
                            System.IO.Path.Combine(TargetDirectoryPath, "O-AlleOrganisationen.txt"));

                        CreatePersonen(Basics.Instance.GetAllIDSForUsageTable("Personen"),
                            System.IO.Path.Combine(TargetDirectoryPath, "P-AllePersonen.txt"));
                        CreatePersonen(new List<String>() {"8c2645ef-eed3-4169-8e63-dae1f5cb55c6"}, // Betreuer
                            System.IO.Path.Combine(TargetDirectoryPath, "P-BetreuerPersonen.txt"));
                        CreatePersonen(Basics.Instance.GetAllIDSForUsageTableButNot("Organisationen", new List<String>()
                            {"8c2645ef-eed3-4169-8e63-dae1f5cb55c6"}), // "Amt", "RSB", "ProjektLeitung", "BJB Liesing", "MA 42"
                            System.IO.Path.Combine(TargetDirectoryPath, "P-AmtPersonen.txt"));

                        CreatePersonenMitTerminen(new List<String>()
                            {
                            "12dbc70f-4909-4bbe-937a-19e17343bcc8",
                            "8c2645ef-eed3-4169-8e63-dae1f5cb55c6"
                            }, //	Betreuer, ProjektLeitung 
                            System.IO.Path.Combine(TargetDirectoryPath, "PMT-BetreuerPersonenMitTerminen.txt"));
                        CreatePersonenMitTerminen(new List<String>()
                            {
                            "0a0d84ec-4b86-4715-9c7b-803251f929b2",
                            "ded79334-19f3-4e49-9834-57f28aeeaacc",
                            "39935843-f43f-499e-b7a8-34f98cff5a68",
                            "39f2f559-e1b4-4022-b772-db5a9a43e04e"
                            }, //"Amt", "RSB", "BJB Liesing", "MA 42"
                            System.IO.Path.Combine(TargetDirectoryPath, "PMT-AmtPersonenMitTerminen.txt"));

                        CreatePersonenTermineAlsAttachments(new List<String>()
                            {
                            "12dbc70f-4909-4bbe-937a-19e17343bcc8",
                            "8c2645ef-eed3-4169-8e63-dae1f5cb55c6",
                            "0a0d84ec-4b86-4715-9c7b-803251f929b2",
                            "ded79334-19f3-4e49-9834-57f28aeeaacc",
                            "39935843-f43f-499e-b7a8-34f98cff5a68",
                            "39f2f559-e1b4-4022-b772-db5a9a43e04e"
                            }, //"Amt", "RSB", "BJB Liesing", "MA 42"
                            System.IO.Path.Combine(TargetDirectoryPath, "PMT-AllePersonenTerminInfo.txt"));

                        CreateTermineInOrganisationen(new List<String>() {"12fef143-5dab-4d76-8aa0-e0f20cfe54cb"}, // "Schule"
                            System.IO.Path.Combine(TargetDirectoryPath, "TIO-SchulenMitTerminen.txt"));
                        CreateTermineInOrganisationen(new List<String>() {"3a1b5101-b19f-4f24-aa77-2e46edfe578b"}, // "Jugend"
                            System.IO.Path.Combine(TargetDirectoryPath, "TIO-JugendMitTerminen.txt"));
                        CreateTermineInOrganisationen(new List<String>() {"f3e261d7-ada9-4421-802a-ae8bd30ce74c"}, // "Amt" 
                            System.IO.Path.Combine(TargetDirectoryPath, "TIO-AmtMitTerminen.txt"));

                        CreateTermineVonOrganisationen(new List<String>() {"3a1b5101-b19f-4f24-aa77-2e46edfe578b"}, // "Jugend"
                            System.IO.Path.Combine(TargetDirectoryPath,
                                "TVO-OrganisationsMitarbeiterMitTerminen.txt"));
                        CreateTermineVonOrganisationen(new List<String>() {"d8577109-5915-4627-927f-4425a6196a15"}, // "RSB"
                            System.IO.Path.Combine(TargetDirectoryPath, "TVO-RSBMitarbeiterMitTerminen.txt"));

            #endregion

                        */
            }
Пример #12
0
        public FlowDocumentBasis (String HeadLineParameter, Section ElementSectionParameter,
            DocumentPrintOut.ElementType LogicalElementTypeParameter)
            {
            ElementSection = ElementSectionParameter;
            HeadLine = HeadLineParameter;
            LogicalElementType = LogicalElementTypeParameter;
            String Margin = "0, 0, 0, 0";
            int Indentation = 0;
            switch (LogicalElementType)
                {
                    case DocumentPrintOut.ElementType.Heading1:
                        {
                        ElementParagraph = new Paragraph (new Bold (new Run (HeadLine)));
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.Heading1];
                        Margin = "0, 0, 0, 0";
                        Indentation = 0;
                        break;
                        }
                    case DocumentPrintOut.ElementType.Heading2:
                        {
                        ElementParagraph = new Paragraph (new Run (HeadLine));
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.Heading1];
                        Margin = "15, 0, 0, 0";
                        Indentation = -10;
                        break;
                        }
                    case DocumentPrintOut.ElementType.ContentLevel1:
                        {
                        ElementParagraph = new Paragraph (new Run (HeadLine));
                        Margin = "15, 0, 0, 0";
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.ContentLevel1];
                        Indentation = -10;
                        break;
                        }
                    case DocumentPrintOut.ElementType.ContentLevel2:
                        {
                        ElementParagraph = new Paragraph (new Run (HeadLine));
                        Margin = "30, 0, 0, 0";
                        Indentation = -25;
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.ContentLevel2];
                        break;
                        }
                    case DocumentPrintOut.ElementType.ContentLevel3:
                        {
                        ElementParagraph = new Paragraph (new Run (HeadLine));
                        Margin = "45, 0, 0, 0";
                        Indentation = -40;
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.ContentLevel3];
                        break;
                        }

                    case DocumentPrintOut.ElementType.TerminAttendee:
                        {
                        ElementParagraph = new Paragraph(new Run(HeadLine));
                        Margin = "30, 0, 0, 0";
                        Indentation = -25;
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable[(int)DocumentPrintOut.ElementSize.ContentLevel2];
                        break;
                        }

                    case DocumentPrintOut.ElementType.PageBreak:
                        {
                        IsPageBreak = true;
                        ElementSection = new Section( new Paragraph (new Run (HeadLine)) { BreakPageBefore = true});
                        return;
                        break;
                        }
                    default:
                        {
                        ElementParagraph = new Paragraph (new Run (HeadLine));
                        ElementParagraph.TextIndent = 150;
                        break;
                        }
                }
            ElementParagraph.Margin = (Thickness) TConverter.ConvertFromString (Margin);
            ElementParagraph.TextIndent = Indentation;
            }
Пример #13
0
        public FlowDocumentBasis (DataSet InputDataSetParameter, Section ElementSectionParameter,
            DocumentPrintOut.ElementType LogicalElementTypeParameter, String PrintThisSecurityGroupParameter,
            bool ShowAktivitaetenDatenParameter, bool WithOrWithoutPlakate)
            {
            PrintThisSecurityGroup = PrintThisSecurityGroupParameter;
            ShowAktivitaetenDaten = ShowAktivitaetenDatenParameter;
            ShowPlakatDaten = WithOrWithoutPlakate;
            ElementSection = ElementSectionParameter;
            InputDataSet = InputDataSetParameter;
            LogicalElementType = LogicalElementTypeParameter;
            switch (DocumentPrintOut.ActuallOutputType)
                {
                    case DocumentPrintOut.OutputType.TabDelimitedFile:
                        switch (LogicalElementType)
                            {
                            }
                        break;
                    case DocumentPrintOut.OutputType.RTFDocument:
                        {
                        switch (LogicalElementType)
                            {
                                case DocumentPrintOut.ElementType.ProjektDatenOhneOrtsBezeichnung:
                                    {

                                    ElementSection = new Section ();
                                    String Ort = "Missing Ort";
                                    String Typ = "Missing Typ";
                                    String Titel = "Missing Titel";
                                    String Zustaendig = "Missing Zustaendig";
                                    String Wertigkeit = String.Empty;
                                    String ImPlenumsFilm = String.Empty;
                                    String ProjektNummer = "...";
                                    if (InputDataSet.Tables ["Projekte"].Rows.Count > 0)
                                        Zustaendig = Basics.Instance.Zustaendig [InputDataSet.Tables ["Projekte"].Rows [0] ["ZustaendigID"].ToString ().ToLower ()]
                                            ["NameID"].ToString ();
                                    if (InputDataSet.Tables ["Orte"].Rows.Count > 0)
                                        {
                                        Ort = DataWrapper.Instance.GetOrteBezeichnung (InputDataSet.Tables ["Orte"].Rows [0]);
                                        }
                                    if (InputDataSet.Tables ["Projekte"].Rows.Count > 0)
                                        Titel = InputDataSet.Tables ["Projekte"].Rows [0] ["Beschreibung"].ToString ();
                                    if (InputDataSet.Tables ["Projekte"].Rows.Count > 0)
                                        ProjektNummer = InputDataSet.Tables ["Projekte"].Rows [0] ["NumericProjektID"].ToString ().Substring (3);

                                    if (InputDataSet.Tables ["Projekte"].Rows.Count > 0)
                                        {
                                        if (String.IsNullOrEmpty (InputDataSet.Tables ["Projekte"].Rows [0] ["ProjekteTypID"].ToString ()))
                                            Typ = "Nicht zugeordnet";
                                        else
                                            Typ =
                                                Basics.Instance.Typ [InputDataSet.Tables ["Projekte"].Rows [0] ["ProjekteTypID"].ToString ()] ["TypNameID"].
                                                    ToString ();
                                        if ((InputDataSet.Tables ["Projekte"].Rows [0] ["Wertigkeit"] != Convert.DBNull)
                                            && (Convert.ToInt32 (InputDataSet.Tables ["Projekte"].Rows [0] ["Wertigkeit"]) > 0))
                                            {
                                            Wertigkeit = ", Wertigkeit (= Prioritätspunkte) = " +
                                                         Convert.ToString (InputDataSet.Tables ["Projekte"].Rows [0] ["Wertigkeit"]);
                                            }
                                        if (String.Compare (InputDataSet.Tables ["Projekte"].Rows [0] ["ImPLenumsFilm"].ToString (),
                                            "Ja", StringComparison.CurrentCultureIgnoreCase) == 0)
                                            ImPlenumsFilm = ", Im Plenums Film";

                                        }

                                    //									Paragraph BasicProjectLine = new Paragraph (new Bold (new Run ("(" + Runn+ingToken + ") " + Ort + ", " + Typ + " - " + Titel)));
                                    Paragraph BasicProjectLine = new Paragraph (new Bold (new Run (Titel)));
                                    BasicProjectLine.Margin = (Thickness) TConverter.ConvertFromString ("40, 0, 0, 0");
                                    BasicProjectLine.TextIndent = -15;
                                    BasicProjectLine.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.Heading2];
                                    ElementSection.Blocks.Add (BasicProjectLine);

                                    //if (String.IsNullOrEmpty (Wertigkeit) == false)
                                    //    {
                                    Paragraph AdditionalProjektInfo;
                                    AdditionalProjektInfo = new Paragraph (new Run ("(" + ProjektNummer + ") " + " Zuständig = " + Zustaendig + Wertigkeit + ImPlenumsFilm));
                                    AdditionalProjektInfo.Margin = (Thickness) TConverter.ConvertFromString ("55, 0, 0, 0");
                                    AdditionalProjektInfo.TextIndent = -10;
                                    AdditionalProjektInfo.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.ContentLevel3];
                                    ElementSection.Blocks.Add (AdditionalProjektInfo);
                                    //}
                                    if (ShowPlakatDaten)
                                        {
                                        ElementSection.Blocks.Add (FillPlakateTable
                                            (InputDataSet.Tables ["Projekte"].Rows [0] ["LangBeschreibung"].ToString (),
                                                InputDataSet.Tables ["Projekte"].Rows [0] ["OrtsHinweis"].ToString (),
                                                InputDataSet.Tables ["WSPlakate"]));
                                        ElementSection.Blocks.LastBlock.Margin = new Thickness (100, 0, 0, 0);
                                        }
                                    if (!String.IsNullOrEmpty(PrintThisSecurityGroup))
                                        {
                                        ElementSection.Blocks.Add (FillActivitiesTable
                                            (PrintThisSecurityGroup, InputDataSet.Tables ["FullAktivitaeten"]));
                                        ElementSection.Blocks.LastBlock.Margin = new Thickness(100, 0, 0, 0);

                                        }

                                    break;
                                    }
		
                                case DocumentPrintOut.ElementType.ProjektDatenMitOrtsBezeichnung:
                                    {

                                    ElementSection = new Section ();
                                    String Ort = "Missing Ort";
                                    String Typ = "Missing Typ";
                                    String Titel = "Missing Titel";
                                    String Zustaendig = "Missing Zustaendig";
                                    String Wertigkeit = String.Empty;
                                    String ImPlenumsFilm = String.Empty;
                                    String ProjektNummer = "...";
                                    if (InputDataSet.Tables ["Projekte"].Rows.Count > 0)
                                        Zustaendig = Basics.Instance.Zustaendig [InputDataSet.Tables ["Projekte"].Rows [0] ["ZustaendigID"].ToString ().ToLower( )]
                                            ["NameID"].ToString ();
                                    if (InputDataSet.Tables ["Orte"].Rows.Count > 0)
                                        {
                                        Ort = DataWrapper.Instance.GetOrteBezeichnung (InputDataSet.Tables ["Orte"].Rows [0]);
                                        }
                                    if (InputDataSet.Tables ["Projekte"].Rows.Count > 0)
                                        Titel = InputDataSet.Tables ["Projekte"].Rows [0] ["Beschreibung"].ToString ();
                                    if (InputDataSet.Tables ["Projekte"].Rows.Count > 0)
                                        ProjektNummer = InputDataSet.Tables ["Projekte"].Rows [0] ["NumericProjektID"].ToString ().Substring (3);

                                    if (InputDataSet.Tables ["Projekte"].Rows.Count > 0)
                                        {
                                        if (String.IsNullOrEmpty (InputDataSet.Tables ["Projekte"].Rows [0] ["ProjekteTypID"].ToString ()))
                                            Typ = "Nicht zugeordnet";
                                        else
                                            Typ =
                                                Basics.Instance.Typ [InputDataSet.Tables ["Projekte"].Rows [0] ["ProjekteTypID"].ToString ()] ["TypNameID"].
                                                    ToString ();
                                        if ((InputDataSet.Tables ["Projekte"].Rows [0] ["Wertigkeit"] != Convert.DBNull)
                                            && (Convert.ToInt32 (InputDataSet.Tables ["Projekte"].Rows [0] ["Wertigkeit"]) > 0))
                                            {
                                            Wertigkeit = ", Wertigkeitspunkte = " +
                                                         Convert.ToString (InputDataSet.Tables ["Projekte"].Rows [0] ["Wertigkeit"]);
                                            }
                                        if (String.Compare (InputDataSet.Tables ["Projekte"].Rows [0] ["ImPLenumsFilm"].ToString (),
                                            "Ja", StringComparison.CurrentCultureIgnoreCase) == 0)
                                            ImPlenumsFilm = ", Im Plenums Film";

                                        }

//									Paragraph BasicProjectLine = new Paragraph (new Bold (new Run ("(" + RunningToken + ") " + Ort + ", " + Typ + " - " + Titel)));
                                    Paragraph BasicProjectLine = new Paragraph (new Bold (new Run ("(" + ProjektNummer + ") " +  Ort + " - " + Titel)));
                                    BasicProjectLine.Margin = (Thickness) TConverter.ConvertFromString ("40, 0, 0, 0");
                                    BasicProjectLine.TextIndent = -15;
                                    BasicProjectLine.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.ContentLevel1];
                                    ElementSection.Blocks.Add (BasicProjectLine);

                                    //if (String.IsNullOrEmpty (Wertigkeit) == false)
                                    //    {
                                    Paragraph AdditionalProjektInfo;
                                    AdditionalProjektInfo = new Paragraph (new Run ("ProjektTyp = " + Typ + ", Zuständig = " + Zustaendig
                                                                                    + Wertigkeit + ImPlenumsFilm));
                                    AdditionalProjektInfo.Margin = (Thickness) TConverter.ConvertFromString ("55, 0, 0, 0");
                                    AdditionalProjektInfo.TextIndent = -10;
                                    AdditionalProjektInfo.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.ContentLevel3];
                                    ElementSection.Blocks.Add (AdditionalProjektInfo);
                                    //}
                                    if (ShowPlakatDaten)
                                        {
                                        ElementSection.Blocks.Add (FillPlakateTable
                                            (InputDataSet.Tables ["Projekte"].Rows [0] ["LangBeschreibung"].ToString (),
                                                InputDataSet.Tables ["Projekte"].Rows [0] ["OrtsHinweis"].ToString (),
                                                InputDataSet.Tables ["WSPlakate"]));
                                        ElementSection.Blocks.LastBlock.Margin = new Thickness (100, 0, 0, 0);
                                        }
                                    if (ShowAktivitaetenDaten == true)
                                        {
                                        ElementSection.Blocks.Add (FillActivitiesTable
                                            (PrintThisSecurityGroup, InputDataSet.Tables ["FullAktivitaeten"]));
                                        ElementSection.Blocks.LastBlock.Margin = new Thickness(100, 0, 0, 0);
                                        }

                                    break;
                                    }
                            }
                        break;
                        }
                    case DocumentPrintOut.OutputType.HTMLPage:
                        {
                        break;
                        }
                }

            }
Пример #14
0
 private void ProcessOneProjectToPrintout(DocumentPrintOut Writer, String ProjectID,
     DocumentPrintOut.ElementType TypeOfProjectPrintout,
     bool WithOrWithoutPlakate = true, bool WithOrWithoutActivities = true,
     bool WithOrWithoutTermine = false, bool WithOrWithoutProjektUebersicht = false)
     {
     DataSet ProjektGesamtschau = DataWrapper.Instance.GetAllDataBelongingToOneProject
         (ProjectID, WithOrWithoutPlakate, WithOrWithoutActivities, WithOrWithoutTermine,
             WithOrWithoutProjektUebersicht);
     Writer.WithOrWithoutPlakate = WithOrWithoutPlakate;
     Writer.WriteData(ProjektGesamtschau, TypeOfProjectPrintout);
     }
Пример #15
0
 private void CreatePersonenTermineAlsAttachments(List<String> TypListToSelect,
     String FileName)
     {
     String TypSelectPart = Data.DbServer3.WordUp.Typen.TypSelectionString(TypListToSelect, "PersonenTypID");
     String PersonenSelectStatement = "Select * from PersonenOrganisationenOrte where ID in "
                                      + "(Select PersonenID from PersonenZuWordUpID where WordUpID = '"
                                      + Basics.Instance.WordUpID + "')  and " + TypSelectPart +
                                      " order by FamilienName";
     DataTable PersonenTable =
         WordUpWCFAccess.GetCommonDataSet(PersonenSelectStatement).Tables["PersonenOrganisationenOrte"];
     List<System.Guid> AllPersonen = GetAllPersonenIDs(TypListToSelect);
     foreach (DataRow PersonenRow in PersonenTable.Rows)
         {
         DataTable TermineProPerson = WordUpWCFAccess.GetCommonDataSet
             ("Select * from TermineZuFullPersonen where PersonenID = '"
              + PersonenRow["ID"].ToString() + "' and WordUpRootID = '" + Basics.Instance.WordUpID
              + "' order by Von").Tables["TermineZuFullPersonen"];
         if (TermineProPerson.Rows.Count == 0)
             continue;
         String PersonenFileName = FileName.Replace
             (".txt", "_eMailTo_" + PersonenRow["eMail"].ToString().Replace(" ", "_") + ".txt");
         DocumentPrintOut PersonenWriter = new DocumentPrintOut(PersonenFileName, false);
         PersonenWriter.WriteLine(DocumentPrintOut.ElementType.Heading1,
             "Terminübersicht mit Stand " + DateTime.Now.ToString("dd. MMM yyyy") + " für:");
         PersonenWriter.InsertEmptyLine();
         PersonenWriter.WriteData(PersonenRow, DocumentPrintOut.ElementType.FullPersonenDaten);
         PersonenWriter.InsertEmptyLine();
         foreach (DataRow TerminRow in TermineProPerson.Rows)
             {
             PersonenWriter.WriteData(TerminRow, DocumentPrintOut.ElementType.SimpleTerminDaten);
             CreateParticipantsList(PersonenWriter, TerminRow["TermineID"].ToString(), false, AllPersonen);
             }
         PersonenWriter.InsertEmptyLine();
         PersonenWriter.WriteLine(DocumentPrintOut.ElementType.Heading1, "Kontaktdaten aller Beteiligten");
         PersonenWriter.InsertEmptyLine();
         CreatePersonen(TypListToSelect, PersonenWriter);
         PersonenWriter.Close();
         }
     }
Пример #16
0
	    public void CreatePlakatListingsDependingOnAssignmentStatus(DataWrapper.SortOrder SortCriteria,
		    Basics.DataSelection SpecialPhase, String[] SecurityGroupParameter,
		    bool WithOrWithoutPlakate, bool WithOrWithoutActivities, bool WithOrWithoutTermine,
		    String OutputFileName, String HeadLine, WSPlakatContentType wsPlakatContentType)
		    {
			DocumentPrintOut.ActuallOutputType = DocumentPrintOut.OutputType.RTFDocument;
			DocumentPrintOut PlakatWriter = new DocumentPrintOut
				(System.IO.Path.Combine(DataWrapper.Instance.TargetDirectory, OutputFileName),
					false);
				bool PageBreakRequested = false;
				PlakatWriter.WriteLine(DocumentPrintOut.ElementType.Heading1, HeadLine);
				foreach (Organisation Klasse in
						Data.DbServer3.WordUp.Organisationen.AktuelleKlassen.OrderBy(klasse => klasse.CodeName))
					{
					int NumberOfPlakateDerKlasse = Data.DbServer3.WordUp.WSPlakate
						.Count(whe => whe.Organisation == Klasse);
					int NumberOfAssignedPlakateDerKlasse = Data.DbServer3.WordUp.WSPlakate
						.Count(whe => whe.Organisation == Klasse
								&& whe.Projekt != null);
					int NumberOfUnAssignedPlakateDerKlasse = Data.DbServer3.WordUp.WSPlakate
						.Count(whe => whe.Organisation == Klasse
								&& whe.Projekt == null);
					switch (wsPlakatContentType)
						{
						case WSPlakatContentType.alle:
								break;
						case WSPlakatContentType.Zugeordnet:
								if (NumberOfAssignedPlakateDerKlasse == 0)
									continue;
							break;
						case WSPlakatContentType.nichtZugeordnet:
						if (NumberOfUnAssignedPlakateDerKlasse == 0)
							continue;
						break;
						}
				if (PageBreakRequested)
						PlakatWriter.InsertPageBreak();
					PageBreakRequested = false;
					IEnumerable<WSPlakat> PlakateAusKlasse = Klasse.WSPlakate;
					PlakatWriter.WriteLine(DocumentPrintOut.ElementType.Heading2, $"Plakate der Klasse {Klasse.CodeName} " +
						$"alle {NumberOfPlakateDerKlasse} nZug. {NumberOfUnAssignedPlakateDerKlasse} Zug. {NumberOfAssignedPlakateDerKlasse}");
					Termin connectedWSTermin = Data.DbServer3.WordUp.OrganisationenZuTerminen
							.Where(whe => whe.Organisation == Klasse).Select(sel => sel.Termin)
							.Where(whe => whe.TermineTypId == TermineTypen.WS
										|| whe.TermineTypId == TermineTypen.OeffWS).FirstOrDefault();
					List<String> Betreuer = new List<string>();
					foreach (PersonZuTermin personZuTermin in connectedWSTermin.PersonenZuTerminen)
						Betreuer.Add(personZuTermin.Person.VorName + " " + personZuTermin.Person.FamilienName);
					String BetreuerNamen = String.Join(", ", Betreuer);
					PlakatWriter.WriteLine(DocumentPrintOut.ElementType.ContentLevel1, $"Betreuer beim Workshop: {BetreuerNamen}");
					if (PlakateAusKlasse.Count() == 0)
						{
						PlakatWriter.WriteLine(DocumentPrintOut.ElementType.ContentLevel1, "Bisher keine Plakate erfasst");
						continue;
						}

					String OldPlakat = String.Empty;
					PageBreakRequested = true; //More than 0 Plakatlines available
					foreach (WSPlakat PlakatZeile in PlakateAusKlasse.OrderBy(plakat => plakat.ErfassungsId))
						{
						String projektNumber = String.Empty;
						switch (wsPlakatContentType)
							{
							case WSPlakatContentType.alle:
								break;
							case WSPlakatContentType.nichtZugeordnet:
								if (PlakatZeile.Projekt != null)
									continue;
								break;
							case WSPlakatContentType.Zugeordnet:
								if (PlakatZeile.Projekt == null)
									continue;
							projektNumber = PlakatZeile.Projekt.NumericProjektId + " - ";
							break;
							}

						if (OldPlakat != PlakatZeile.PlakatID)
							{
							OldPlakat = PlakatZeile.PlakatID;
							PlakatWriter.WriteLine(DocumentPrintOut.ElementType.Heading2, "Plakat # " + OldPlakat);
							}
						PlakatWriter.WriteLine(DocumentPrintOut.ElementType.ContentLevel1,
							$"- {projektNumber}" + PlakatZeile.LangBeschreibung);
						PlakatWriter.WriteLine(DocumentPrintOut.ElementType.ContentLevel2,
								$"  {PlakatZeile.Ort.Bezeichnung} - " +
										$"({PlakatZeile.OrtsHinweis})");
						}
					}

			PlakatWriter.Close();
			}
Пример #17
0
        public FlowDocumentBasis (String HeadLineParameter, Section ElementSectionParameter,
            DocumentPrintOut.ElementType LogicalElementTypeParameter, String Margin, int Indendation)
            {
            ElementSection = ElementSectionParameter;
            HeadLine = HeadLineParameter;
            LogicalElementType = LogicalElementTypeParameter;

            switch (LogicalElementType)
                {
                    case DocumentPrintOut.ElementType.Heading1:
                        {
                        ElementParagraph = new Paragraph (new Bold (new Run (HeadLine)));
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.Heading1];
                        break;
                        }
                    case DocumentPrintOut.ElementType.Heading2:
                        {
                        ElementParagraph = new Paragraph (new Run (HeadLine));
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.Heading2];
                        break;
                        }
                    case DocumentPrintOut.ElementType.ContentLevel1:
                        {
                        ElementParagraph = new Paragraph (new Run (HeadLine));
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.ContentLevel1];
                        break;
                        }
                    case DocumentPrintOut.ElementType.ContentLevel2:
                        {
                        ElementParagraph = new Paragraph (new Run (HeadLine));
                        ElementParagraph.TextIndent = 50;
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.ContentLevel2];
                        break;
                        }
                    case DocumentPrintOut.ElementType.ContentLevel3:
                        {
                        ElementParagraph = new Paragraph (new Run (HeadLine));
                        ElementParagraph.TextIndent = 100;
                        ElementParagraph.FontSize = Basics.Instance.FontSizeTable [(int) DocumentPrintOut.ElementSize.ContentLevel3];
                        break;
                        }

                    case DocumentPrintOut.ElementType.TerminAttendee:
                        {
                        Paragraph Teilnehmer = new Paragraph (new Run (HeadLine));
                        Table AdressenTable = GetStandardTable (1);
                        AdressenTable.RowGroups [0].Rows [0].Cells.Add (new TableCell ());
                        AdressenTable.RowGroups [0].Rows [0].Cells.Add (new TableCell (Teilnehmer));
                        ElementSection = new Section ();
                        ElementSection.Blocks.Add (AdressenTable);
                        break;
                        }

                    default:
                        {
                        ElementParagraph = new Paragraph (new Run (HeadLine));
                        ElementParagraph.TextIndent = 150;
                        break;
                        }
                }
            ElementParagraph.TextIndent = Indendation;
            ElementParagraph.Margin = (Thickness) TConverter.ConvertFromString (Margin);
            }