Beispiel #1
0
        /// <summary>
        /// Обновление структуры организации
        /// </summary>
        public void UpdateTree()
        {
            try
            {
                Departments = manager.GetDepartments();
                Employees   = manager.GetEmployee();

                builder.Sotring(Departments.Cast <IOrgItem>().ToList());
                builder.Sotring(Employees.Cast <IOrgItem>().ToList());

                updateTreeEventArgs.Root        = builder.Root;
                updateTreeEventArgs.DepNameList = DepartmentNames;
                modelHedlerUpdateTree.Invoke(this, updateTreeEventArgs);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                updateTreeEventArgs.Message = String.Format("Ошибка. {0}", e.Message);
                modelHedlerUpdateTreerMessage.Invoke(this, updateTreeEventArgs);
            }
        }