示例#1
0
        /// <summary>
        /// Nach dem Editieren wird auf Korrektheit geprüft und ggfs. in die DB gespeichert
        /// Author: Antonios Fesenmeier
        /// </summary>
        /// <param name="button"></param>
        private void pbSave_Click(Button button)
        {
            _Validator.clearSB();
            // Wurde die Validierung positiv abgeschlossen müssen die Werte der einzelnen Felder in die Datenbank geschrieben werden!
            CheckForm();

            var isCompany = chBIsCompany.IsChecked;

            if (_IsValid == false)
            {
                MessageBoxEnhanced.Error(_Validator.getErrorMsg().ToString());
            }
            else
            {
                var title       = cbTitle.SelectedItem as DB.Title;
                var fundingType = cBFundType.SelectedItem as DB.FundingType;

                if (isCompany == true)
                {
                    DB.Sponsor.Update(_CurrentSponsor.SponsorID, title.TitleID, fundingType.FundingTypeID, txtStreet.Text, txtCity.Text, Convert.ToInt32(txtZipCode.Text),
                                      txtFirstName.Text, txtLastName.Text, txtCompanyName.Text, txtMobileNo.Text, txtTelNo.Text, txtFax.Text, txtEMail.Text, null, isCompany.Value);
                }
                else
                {
                    DB.Sponsor.Update(_CurrentSponsor.SponsorID, title.TitleID, fundingType.FundingTypeID, txtStreet.Text, txtCity.Text, Convert.ToInt32(txtZipCode.Text),
                                      txtFirstName.Text, txtLastName.Text, "", txtMobileNo.Text, txtTelNo.Text, txtFax.Text, txtEMail.Text, null, isCompany.Value);
                }

                KPage      pageSponsorAdministration = new KöTaf.WPFApplication.Views.pSponsorAdministration(pagingStartValue);
                SinglePage singlePage = new SinglePage(IniParser.GetSetting("APPSETTINGS", "sponsorAdministration"), pageSponsorAdministration);
            }
            _Validator.clearSB();
        }
示例#2
0
        /// <summary>
        /// Nach Validierung der einzelnen Felder wird der Sponsor in der DB abgelegt
        /// Author: Anotnios Fesenmeier
        /// </summary>
        /// <param name="button"></param>
        private void pbSave_Click(Button button)
        {
            //  bool formLetter = false;
            _Validator.clearSB();
            // Wurde die Validierung positiv abgeschlossen müssen die Werte der einzelnen Felder in die Datenbank geschrieben werden!
            CheckForm();

            if (!this._IsValid)
            {
                MessageBoxEnhanced.Error(_Validator.getErrorMsg().ToString());
            }
            else
            {
                var fundingType         = cBFundingTyp.SelectedItem as FundingType;
                var title               = cbTitle.SelectedItem as Title;
                var isFormLetterAllowed = chBformLetter.IsChecked;
                var isCompany           = chBIsCompany.IsChecked;
                int _sponsorID;

                if (isCompany == true)
                {
                    _sponsorID = Sponsor.Add(fundingType.FundingTypeID, title.TitleID, txtFirstName.Text, txtLastName.Text, txtCity.Text, txtStreet.Text, Convert.ToInt32(txtZipCode.Text),
                                             isFormLetterAllowed.Value, txtCompanyName.Text, null, txtEMail.Text, txtFax.Text, txtMobileNo.Text, txtTelNo.Text, isCompany.Value);
                }
                else
                {
                    _sponsorID = Sponsor.Add(fundingType.FundingTypeID, title.TitleID, txtFirstName.Text, txtLastName.Text, txtCity.Text, txtStreet.Text, Convert.ToInt32(txtZipCode.Text),
                                             isFormLetterAllowed.Value, txtCompanyName.Text, null, txtEMail.Text, txtFax.Text, txtMobileNo.Text, txtTelNo.Text, isCompany.Value);
                }
                if (_sponsorID > 0)
                {
                    KPage      pageSponsorAdministration = new KöTaf.WPFApplication.Views.pSponsorAdministration();
                    SinglePage singlePage = new SinglePage("Sponsorverwaltung", pageSponsorAdministration);
                }
                else
                {
                    MessageBoxEnhanced.Error("Es ist ein Fehler beim speichern des Datensatzes aufgetreten");
                }
            }
            _Validator.clearSB();
        }
示例#3
0
 /// <summary>
 ///  Button zum Abbruch
 /// </summary>
 /// <param name="button"></param>
 private void pbBack_Click(Button button)
 {
     KPage      pageSponsorAdministration = new KöTaf.WPFApplication.Views.pSponsorAdministration(pagingStartValue);
     SinglePage singlePage = new SinglePage(IniParser.GetSetting("APPSETTINGS", "sponsorAdministration"), pageSponsorAdministration);
 }
示例#4
0
        /// <summary>
        /// Nach dem Editieren wird auf Korrektheit geprüft und ggfs. in die DB gespeichert
        /// Author: Antonios Fesenmeier
        /// </summary>
        /// <param name="button"></param>
        private void pbSave_Click(Button button)
        {
            _Validator.clearSB();
            // Wurde die Validierung positiv abgeschlossen müssen die Werte der einzelnen Felder in die Datenbank geschrieben werden!
            CheckForm();

            var isCompany = chBIsCompany.IsChecked;

            if (_IsValid == false)
                MessageBoxEnhanced.Error(_Validator.getErrorMsg().ToString());
            else
            {
                var title = cbTitle.SelectedItem as DB.Title;
                var fundingType = cBFundType.SelectedItem as DB.FundingType;

                if (isCompany == true)
                {

                    DB.Sponsor.Update(_CurrentSponsor.SponsorID, title.TitleID, fundingType.FundingTypeID, txtStreet.Text, txtCity.Text, Convert.ToInt32(txtZipCode.Text),
                     txtFirstName.Text, txtLastName.Text, txtCompanyName.Text, txtMobileNo.Text, txtTelNo.Text, txtFax.Text, txtEMail.Text, null, isCompany.Value);
                }
                else
                {
                    DB.Sponsor.Update(_CurrentSponsor.SponsorID, title.TitleID, fundingType.FundingTypeID, txtStreet.Text, txtCity.Text, Convert.ToInt32(txtZipCode.Text),
                     txtFirstName.Text, txtLastName.Text, "", txtMobileNo.Text, txtTelNo.Text, txtFax.Text, txtEMail.Text, null, isCompany.Value);
                }

                KPage pageSponsorAdministration = new KöTaf.WPFApplication.Views.pSponsorAdministration(pagingStartValue);
                SinglePage singlePage = new SinglePage(IniParser.GetSetting("APPSETTINGS", "sponsorAdministration"), pageSponsorAdministration);
            }
            _Validator.clearSB();
        }
示例#5
0
 /// <summary>
 ///  Button zum Abbruch
 /// </summary>
 /// <param name="button"></param>
 private void pbBack_Click(Button button)
 {
     KPage pageSponsorAdministration = new KöTaf.WPFApplication.Views.pSponsorAdministration(pagingStartValue);
     SinglePage singlePage = new SinglePage(IniParser.GetSetting("APPSETTINGS", "sponsorAdministration"), pageSponsorAdministration);
 }
示例#6
0
 private void pbBack_Click(Button button)
 {
     KPage      pageSponsorAdministration = new KöTaf.WPFApplication.Views.pSponsorAdministration();
     SinglePage singlePage = new SinglePage("Sponsorverwaltung", pageSponsorAdministration);
 }
示例#7
0
        /// <summary>
        /// Nach Validierung der einzelnen Felder wird der Sponsor in der DB abgelegt
        /// Author: Anotnios Fesenmeier
        /// </summary>
        /// <param name="button"></param>
        private void pbSave_Click(Button button)
        {
            //  bool formLetter = false;
            _Validator.clearSB();
            // Wurde die Validierung positiv abgeschlossen müssen die Werte der einzelnen Felder in die Datenbank geschrieben werden!
            CheckForm();

            if (!this._IsValid)
                MessageBoxEnhanced.Error(_Validator.getErrorMsg().ToString());
            else
            {
                var fundingType = cBFundingTyp.SelectedItem as FundingType;
                var title = cbTitle.SelectedItem as Title;
                var isFormLetterAllowed = chBformLetter.IsChecked;
                var isCompany = chBIsCompany.IsChecked;
                int _sponsorID;

                if (isCompany == true)
                {
                    _sponsorID = Sponsor.Add(fundingType.FundingTypeID, title.TitleID, txtFirstName.Text, txtLastName.Text, txtCity.Text, txtStreet.Text, Convert.ToInt32(txtZipCode.Text),
                         isFormLetterAllowed.Value, txtCompanyName.Text, null, txtEMail.Text, txtFax.Text, txtMobileNo.Text, txtTelNo.Text, isCompany.Value);
                }
                else
                {
                    _sponsorID= Sponsor.Add(fundingType.FundingTypeID, title.TitleID, txtFirstName.Text, txtLastName.Text, txtCity.Text, txtStreet.Text, Convert.ToInt32(txtZipCode.Text),
                        isFormLetterAllowed.Value, txtCompanyName.Text, null, txtEMail.Text, txtFax.Text, txtMobileNo.Text, txtTelNo.Text, isCompany.Value);
                }
                if (_sponsorID > 0)
                {
                    KPage pageSponsorAdministration = new KöTaf.WPFApplication.Views.pSponsorAdministration();
                    SinglePage singlePage = new SinglePage("Sponsorverwaltung", pageSponsorAdministration);
                }
                else
                    MessageBoxEnhanced.Error("Es ist ein Fehler beim speichern des Datensatzes aufgetreten");

            }
            _Validator.clearSB();
        }
示例#8
0
 private void pbBack_Click(Button button)
 {
     KPage pageSponsorAdministration = new KöTaf.WPFApplication.Views.pSponsorAdministration();
     SinglePage singlePage = new SinglePage("Sponsorverwaltung", pageSponsorAdministration);
 }