Ejemplo n.º 1
0
        ///////******** РАБОТА С ФАЙЛОМ(БАЗА) *********\\\\\\\\

        #region File
        public void New_File()
        {
            journal = new Journal();
            Zaochnoe_Distancionnoe = new OtdelenieEvent();
            Dnevnoe = new OtdelenieEvent();
            dekanat = new Dictionary <int, Dictionary <string, Student> >();
            dekanat.Add(0, Dnevnoe);
            dekanat.Add(1, Zaochnoe_Distancionnoe);
            ICollection <int> keys = dekanat.Keys;

            foreach (int key in keys)
            {
                ((OtdelenieEvent)dekanat[key]).CollectionCountChanged  += new CollectionHandler(journal.CollectionCountChanged);
                ((OtdelenieEvent)dekanat[key]).CollectionObjectChanged += new CollectionHandler(journal.CollectionReferenceChanged);
            }
        }
Ejemplo n.º 2
0
        public void Auto_Gen()
        {
            dekanat = new Dictionary <int, Dictionary <string, Student> >();
            Dnevnoe = Otdelenie.Auto_Dnevnoe(rnd.Next(10, 50));
            Zaochnoe_Distancionnoe = Otdelenie.Auto_Zaochnoe_Distancionnoe(rnd.Next(20, 40), rnd.Next(10, 30));
            dekanat[0]             = Dnevnoe;
            dekanat[1]             = Zaochnoe_Distancionnoe;
            ICollection <int> keys = dekanat.Keys;

            foreach (int key in keys)
            {
                ((OtdelenieEvent)dekanat[key]).CollectionCountChanged  += new CollectionHandler(journal.CollectionCountChanged);
                ((OtdelenieEvent)dekanat[key]).CollectionObjectChanged += new CollectionHandler(journal.CollectionReferenceChanged);
            }
            CreateTable();
        }