예제 #1
0
        public ActionResult KontoInformationen(KontoInformationenModel model, string auswahl)
        {
            Debug.WriteLine("POST - KonsumKredit - KontoInformationen");

            if (ModelState.IsValid)
            {
                /// speichere Daten über BusinessLogic
                bool erfolgreich = false;

                if (auswahl == "neu" || auswahl == "bestehend")
                {
                    erfolgreich = KonsumKreditVerwaltung.KontoInformationenSpeichern(
                        model.BankName,
                        model.IBAN,
                        model.BIC,
                        auswahl == "neu",
                        model.ID_Kunde);
                }
                else if (auswahl == "kreditkarte")
                {
                    erfolgreich = KonsumKreditVerwaltung.KreditKartenDatenSpeichern(
                        model.KreditKartenInhaber,
                        model.KreditKartenNummer,
                        DateTime.Parse(model.KreditKartenGültigBis),
                        model.ID_Kunde);
                }

                if (erfolgreich)
                {
                    return(RedirectToAction("Zusammenfassung"));
                }
            }

            return(View());
        }
예제 #2
0
        public ActionResult KontoInformationen(KontoInformationenModel model)
        {
            Debug.WriteLine("POST - KonsumKredit - KontoInformationen");

            if (ModelState.IsValid)
            {
                /// speichere Daten über BusinessLogic
                if (KonsumKreditVerwaltung.KontoInformationenSpeichern(
                        model.BankName,
                        model.IBAN,
                        model.BIC,
                        model.NeuesKonto,
                        model.ID_Kunde))
                {
                    return(RedirectToAction("Zusammenfassung"));
                }
            }

            return(View());
        }