예제 #1
0
        public static void LoadOtdelKadrov()        //ref OtdelKadrov myKadry
        {
            FileStream    filestream = new FileStream("file.xml", FileMode.Open, FileAccess.Read, FileShare.Read);
            XmlSerializer xmls       = new XmlSerializer(typeof(OtdelKadrov));

            myKadry = (OtdelKadrov)xmls.Deserialize(filestream);
            filestream.Close();
        }
예제 #2
0
        public static void Main(string[] args)
        {
            myKadry = new OtdelKadrov();
            LoadOtdelKadrov();

            /*myKadry.sotrudniki.Add(new Sotrudnik("ayaz","Zali","Aidar","developer","otdel1","89518954606","0","0"));
             * myKadry.dolzhnosti.Add("developer");
             * myKadry.dolzhnosti.Add("qa");
             * myKadry.dolzhnosti.Add("project manager");
             * myKadry.dolzhnosti.Add("business analyst");
             * myKadry.dolzhnosti.Add("product owner");
             *
             * myKadry.otdely.Add("отдел1");
             * myKadry.otdely.Add("отдел2");
             * myKadry.otdely.Add("отдел3");
             * myKadry.otdely.Add("отдел4");
             */
            //Console.Write("Press any key to continue . . .   И база сохраниться");
            SaveOtdelKadrov();
            //Console.ReadKey(true);
        }