//internal RowDefinition DepartmentRow;
 //internal RowDefinition OrganizationRow;
 //internal RowDefinition EnterpriseGroupRow;
 //internal TreeView FirstTreeView;
 //internal RecentLinkListItem RecentLinkListItem;
 //internal SelfDepartment SelfDepartmentItem;
 //internal Expander OrgExpander;
 //internal TextBlock tbkEmpCount;
 //internal DepartmentTreeView DepartmentTree;
 //internal StatusBar GridHideBar;
 //internal Button btnAddGroup;
 //internal ContextMenu treEntGroupContextMenu;
 //internal Path pathGridHide;
 //internal EnterpriseGroupListView listEntGroup;
 ////private bool _contentLoaded;
 public EmployeeTabItem()
 {
     this.InitializeComponent();
     this.dataService = ServiceUtil.Instance.DataService;
     this.sessionService = ServiceUtil.Instance.SessionService;
     this.customGroupManagerViewModel = CustomGroupManagerWindowViewModel.GetInstance();
     this.FirstTreeView.ContextMenu = this.GetContextMenuForTree();
     this.FirstTreeView.ContextMenu.Visibility = Visibility.Hidden;
     this.customGroupManagerViewModel.AddMemberToCustomGroupEvent += new CustomGroupManagerWindowViewModel.MemberToCustomGroup(this.customGroupManagerViewModel_AddMemberToCustomGroupEvent);
     this.FirstTreeView.Focusable = true;
     this.FirstTreeView.MouseLeftButtonDown += new MouseButtonEventHandler(this.FirstTreeView_MouseLeftButtonDown);
 }
 public static CustomGroupManagerWindowViewModel GetInstance()
 {
     if (CustomGroupManagerWindowViewModel.Instance == null)
     {
         lock (CustomGroupManagerWindowViewModel.obj)
         {
             if (CustomGroupManagerWindowViewModel.Instance == null)
             {
                 CustomGroupManagerWindowViewModel.Instance = new CustomGroupManagerWindowViewModel();
             }
         }
     }
     return CustomGroupManagerWindowViewModel.Instance;
 }
 public static CustomGroupManagerWindowViewModel GetInstance()
 {
     if (CustomGroupManagerWindowViewModel.Instance == null)
     {
         lock (CustomGroupManagerWindowViewModel.obj)
         {
             if (CustomGroupManagerWindowViewModel.Instance == null)
             {
                 CustomGroupManagerWindowViewModel.Instance = new CustomGroupManagerWindowViewModel();
             }
         }
     }
     return(CustomGroupManagerWindowViewModel.Instance);
 }
 //internal Border OuterBorder;
 //internal Border InnerBorder;
 //internal StatusBar topBar;
 //internal Image imgIcon;
 //internal ImageButton btnMin;
 //internal ComboBox cboxDeptList;
 //internal ListBox lstBoxFrom;
 //internal Label label2;
 //internal ListBox lstBoxTo;
 //internal TextBlock lblDeleteAll;
 //internal TextBlock lblAddAll;
 //internal Button btnOk;
 //internal Button btnClose;
 //private bool _contentLoaded;
 public AddMemberCustomGroupWindow(string groupid)
 {
     ThemeSwitcher.LoadSkin(ThemeEnum.Aero, this);
     this.InitializeComponent();
     this.groupId = groupid;
     this.viewModel = CustomGroupManagerWindowViewModel.GetInstance();
     this.cboxDeptList.SelectionChanged += new SelectionChangedEventHandler(this.cboxDeptList_SelectionChanged);
     this.InitialDeptList();
     this.btnClose.Click += delegate(object s, RoutedEventArgs e)
     {
         base.Close();
     };
     this.InitialToBox(groupid);
 }
 public CustomGroupTreeViewItem()
 {
     this.InitializeComponent();
     this.customGroupManagerViewModel = CustomGroupManagerWindowViewModel.GetInstance();
     this.tBlock.ContextMenu = this.GetContextMenu();
     this.tBlock.Text = "新建分组";
     this.sessionService = ServiceUtil.Instance.SessionService;
     this.dataService = ServiceUtil.Instance.DataService;
     this.inWindow = (this.dataService.INWindow as INWindow);
     this.tb.LostFocus += new RoutedEventHandler(this.LostFocus_HandleEvent);
     this.tb.KeyUp += delegate(object s, KeyEventArgs ee)
     {
         if (ee.Key == Key.Return)
         {
             this.TextBoxLostFocus();
         }
     };
     this.tb.SelectAll();
     base.MouseRightButtonDown += new MouseButtonEventHandler(this.CustomGroupTreeViewItem_MouseRightButtonDown);
     base.Loaded += new RoutedEventHandler(this.CustomGroupTreeViewItem_Loaded);
 }
 private void customGroupManagerViewModel_AddMemberToCustomGroupEvent(object sender, CustomGroupManagerWindowViewModel.MemberToCustomGroupEventArgs args)
 {
     string groupId = args.GroupId;
     System.Collections.Generic.List<Staff> staffs = new System.Collections.Generic.List<Staff>();
     if (!string.IsNullOrEmpty(args.Uid))
     {
         staffs = new System.Collections.Generic.List<Staff>();
         string[] Uids = args.Uid.Split(new char[]
         {
             ':'
         });
         string[] array = Uids;
         for (int i = 0; i < array.Length; i++)
         {
             string id = array[i];
             if (!string.IsNullOrEmpty(id))
             {
                 Staff staff = this.dataService.GetStaff((long)int.Parse(id));
                 staffs.Add(staff);
             }
         }
     }
     if (staffs != null)
     {
         this.Sort(staffs, groupId);
     }
 }