private void btnAddPosition_Click(object sender, RoutedEventArgs e)
 {
     if (this.RadViewSource.SelectedItem != null)
     {
         var win = new StructurePosition(0, this.id_selectedDepartment);
         win.ShowDialog();
         this.LoadPositions();
     }
     else
     {
         MessageBox.Show("Моля, изберете звено от дървовидната структура на организацията.");
     }
 }
        private void btnEditPosition_Click(object sender, RoutedEventArgs e)
        {
            var item = this.RadViewSource.SelectedItem as RadTreeViewItem;
            var tag  = item.Tag as StructureTreeViewModel;

            if (this.grGridView.SelectedItem != null)
            {
                var struc = this.grGridView.SelectedItem as StructurePositionViewModel;
                var win   = new StructurePosition(struc.id_structurePosition, this.id_selectedDepartment);
                win.ShowDialog();
                this.LoadPositions();
            }
            else
            {
                MessageBox.Show("Моля, изберете длъжност, която да редактирате.");
            }
        }