Пример #1
0
        public void Save()
        {
            try
            {
                if (!HasChanges())
                {
                    return;
                }
                var other = new Gradebook();
                other.ReadXml("gradebook.xml");
                if (other.Config.Guid != Config.Guid)
                {
                    if (CheckMerge(other))
                    {
                        return;
                    }
                }
            }
            catch (Exception exc)
            {
            }
            var guid = Guid.NewGuid();

            Config.Guid = guid.ToString();
            WriteXml("gradebook.xml");
            Maintenance.BackupFile("gradebook.xml", CurrentUserName);

            /*Student.WriteXml("studentTable.xml");
             * Grade.WriteXml("gradeTable.xml");
             * Course.WriteXml("courseTable.xml");
             */
        }