/// <summary>
        /// Serienbrief-Vorlage speichern
        /// </summary>
        /// <param name="button"></param>
        private void createFormletter_Click(Button button)
        {
            // Liste aller anzuzeigenden Tabs
            List <SimpleTabItem> myTabList = new List <SimpleTabItem>();

            // Füge einen neuen Tab mit der zugehörigen Seite hinzu, die darin angezeigt werden soll
            KPage         filter    = new pFormletterFilterSelection();
            SimpleTabItem tabFilter = new SimpleTabItem(IniParser.GetSetting("FORMLETTER", "formletterReceiver"), filter);

            myTabList.Add(tabFilter);

            // Füge einen neuen Tab mit der zugehörigen Seite hinzu, die darin angezeigt werden soll
            KPage         text    = new pFormletterTextFields();
            SimpleTabItem tabText = new SimpleTabItem(IniParser.GetSetting("FORMLETTER", "formletterTextFields"), text);

            myTabList.Add(tabText);

            // Füge einen neuen Tab mit der zugehörigen Seite hinzu, die darin angezeigt werden soll
            KPage         file    = new pFormletterFileLinking();
            SimpleTabItem tabFile = new SimpleTabItem(IniParser.GetSetting("FORMLETTER", "formletterLinking"), file);

            myTabList.Add(tabFile);

            // Füge drei Buttons hinzu, damit der Speichern-Button unter jedem Tab gleich ist
            tabFilter.toolbar.addButton(IniParser.GetSetting("FORMLETTER", "formletterSave"), saveFormletterTemplate);
            tabFile.toolbar.addButton(IniParser.GetSetting("FORMLETTER", "formletterSave"), saveFormletterTemplate);
            tabText.toolbar.addButton(IniParser.GetSetting("FORMLETTER", "formletterSave"), saveFormletterTemplate);

            tabFilter.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), cancelFormletterTemplate);
            tabFile.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), cancelFormletterTemplate);
            tabText.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), cancelFormletterTemplate);

            // Zeige die Tabs in einer SinglePage an
            SinglePage singlePage = new SinglePage(this, IniParser.GetSetting("FORMLETTER", "formletterNew"), myTabList);
        }
示例#2
0
        /// <summary>
        /// Button zum hinzufügen eines neuen Kunden, laden der jeweiligen Tabseiten und festlegen des ToolbarContents
        ///
        /// Author: Antonios Fesenmeier
        /// </summary>
        /// <param name="Button"></param>
        private void pbNewClient_Click(Button Button)
        {
            /*  var keyValueList = ClientDataGrid.ToKeyValueList();
             * KöTaf.Utils.Printer.CSVExporter csv = new Utils.Printer.CSVExporter(keyValueList);
             * var header = csv.GetHeader();
             * var content = csv.GetData();
             * var csvFull = csv.GetCsv();
             * csv.Write();
             */


            // Adding a new tab with the according page shown under this tab
            KPage         person    = new KöTaf.WPFApplication.Views.Client.pNewClientPerson();
            SimpleTabItem tabPerson = new SimpleTabItem(IniParser.GetSetting("CLIENT", "personalData"), person);

            this._myTabList.Add(tabPerson);

            KPage         partnerChild    = new KöTaf.WPFApplication.Views.Client.pNewClientPartnerChild();
            SimpleTabItem tabPartnerChild = new SimpleTabItem(IniParser.GetSetting("CLIENT", "partnerAndChildren"), partnerChild);

            this._myTabList.Add(tabPartnerChild);

            KPage         revenues    = new KöTaf.WPFApplication.Views.Client.pNewClientRevenues();
            SimpleTabItem tabRevenues = new SimpleTabItem(IniParser.GetSetting("CLIENT", "revenue"), revenues);

            this._myTabList.Add(tabRevenues);

            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNext_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSave_Click);

            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNext_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSave_Click);

            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNext_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSave_Click);

            SinglePage singlePage = new SinglePage(this, IniParser.GetSetting("CLIENT", "createNewClient"), this._myTabList);
        }
示例#3
0
        /// <summary>
        /// Generiert die Untertabs und deren ToolbarContent zum Editieren eines Kunden
        ///
        /// Author: Antonios Fesenmeier, Georg Schmid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditPersonButton_Click(object sender, RoutedEventArgs e)
        {
            //Setzt den Rücksprungwert für das Paging
            pagingStartValue = _DataGridPaging.getStartOfDataGridItems();

            Person currentPerson = ClientDataGrid.SelectedItem as Person;

            // Tabs hinzufügen
            KPage         person    = new KöTaf.WPFApplication.Views.Client.pEditClientPerson(currentPerson);
            SimpleTabItem tabPerson = new SimpleTabItem(IniParser.GetSetting("CLIENT", "personalData"), person);

            this._myTabListEdit.Add(tabPerson);

            KPage         partnerChild    = new KöTaf.WPFApplication.Views.Client.pEditClientPartnerChild(currentPerson);
            SimpleTabItem tabPartnerChild = new SimpleTabItem(IniParser.GetSetting("CLIENT", "partnerAndChildren"), partnerChild);

            this._myTabListEdit.Add(tabPartnerChild);

            KPage         revenues    = new KöTaf.WPFApplication.Views.Client.pEditClientRevenues(currentPerson);
            SimpleTabItem tabRevenues = new SimpleTabItem(IniParser.GetSetting("CLIENT", "revenue"), revenues);

            this._myTabListEdit.Add(tabRevenues);

            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNextEdit_Click);
            tabPerson.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSaveEdit_Click);

            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNextEdit_Click);
            tabPartnerChild.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSaveEdit_Click);

            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "cancel"), pbAbort_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "back"), pbBack_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "next"), pbNextEdit_Click);
            tabRevenues.toolbar.addButton(IniParser.GetSetting("BUTTONS", "save"), pbSaveEdit_Click);

            SinglePage singlePage = new SinglePage(this, IniParser.GetSetting("CLIENT", "editClient"), this._myTabListEdit);
        }