public void SaveAction()
        {
            LogManager.GetLog(GetType()).Info("Save");

            ServiceProvider.Instance.GetService<EventAggregator>().PublishOnUIThread(
                new Events.ShowDialog());

            using (var db = new PetoeterDb(PetoeterDb.FileName))
            {
                var child = new Child();

                Detail.GetData(child);
                child.Updated = DateTime.Now;
                db.Children.Insert(child);

                _account.Children.Add(child);
                _account.Updated = DateTime.Now;
                db.Accounts.Update(_account);
            }

            ServiceProvider.Instance.GetService<EventAggregator>().PublishOnUIThread(
                new Core.Events.SwitchTask
                {
                    Task = new EditAccountViewModel(_account)
                });
        }
        public EditChildCalendarViewModel(Child child)
        {
            LogManager.GetLog(GetType()).Info("Create");
            _child = child;

            Menu = new BackMenu(Menu, "98d040fb-0e97-4eaf-bee4-8f455650493b", BackAction);

            _currentDate = DateTime.Now;
        }
        public EditChildViewModel(Account _account, Child child)
        {
            LogManager.GetLog(GetType()).Info("Create");

            this._account = _account;

            this._child = child;

            Detail = new ChildDetailViewModel(_child);
        }
 public ChildDetailViewModel(Child child = null)
 {
     LogManager.GetLog(GetType()).Info("Create");
     if (child != null)
     {
         _firstName = child.FirstName;
         _lastName = child.LastName;
         _birthDay = child.BirthDay;
         FileID = child.FileId;
     }
 }
 internal void GetData(Child child)
 {
     child.FirstName = _firstName;
     child.LastName = _lastName;
     child.BirthDay = _birthDay;
     child.FileId = _fileId;
 }