コード例 #1
0
        public bool AddPhotographer(List <string> data)
        {
            bool WasAdded = false;

            if (data[1] != "" &&
                DateTime.Compare(DateTime.Today, Convert.ToDateTime(data[2])) > 0)
            {
                PhotographerModel newPhotographerModel = _businessLayer.AddAndReturnPhotographer(data);
                _photographerModelList.Add(newPhotographerModel);

                WasAdded = true;
            }
            else
            {
                MessageBox.Show("Ein Nachname wird benötigt und der Geburtstag muss vor dem heutigen Datum liegen!", "", MessageBoxButton.OK, MessageBoxImage.Information);
            }

            return(WasAdded);
        }