コード例 #1
0
        public void SaveEnrollment()
        {
            try
            {
                var enrollmentsDictionary = _enrollments.ToDictionary(p => p.EnrollmentId);
                if (SelectedEnrollment != null)
                {
                    _enrollmentCommand.Upsert(SelectedEnrollment);

                    Enrollments.Clear();                                //Torlojuk a ListBox-ot
                    Enrollments.AddRange(_enrollmentCommand.GetList()); //Megjelenitjuk benne az uj listat
                    UpdateAppStatus("Enrollment saved.");
                }
            }
            catch (Exception ex)
            {
                UpdateAppStatus(ex.Message);
            }
        }
コード例 #2
0
        public void SaveProfile()
        {
            try
            {
                var profilesDictionary = profiles.ToDictionary(p => p.ProfilesId);

                if (SelectedProfile != null)
                {
                    profileCommand.Upsert(SelectedProfile);
                    profiles.Clear();
                    profiles.AddRange(profileCommand.GetList());
                    UpdateAppStatus("Profile Saved");
                }
            }
            catch (Exception ex)
            {
                UpdateAppStatus(ex.Message);
            }
        }
コード例 #3
0
        public void SaveEnrollment()
        {
            try
            {
                var enrollmentDictionary = _enrollments.ToDictionary(x => x.EnrollmentId);

                if (SelectedEnrollment != null)
                {
                    _enrollmentCommand.Upsert(SelectedEnrollment);

                    Enrollments.Clear();
                    Enrollments.AddRange(_enrollmentCommand.GetList());

                    UpdateAppStatus("Enrollment Saved");
                }
            }
            catch (Exception ex)
            {
                UpdateAppStatus(ex.Message);
            }
        }