public void Group()
 {
     if (this._root.SelectedNode.Text == "Principal")
     {
         var newGroup = new NewGroup(this._root);
         newGroup.ShowDialog();
     }
     else
     {
         MessageBox.Show("Não é possível criar subgrupos!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #2
0
        private void Add()
        {
            var context = new GroupVM(departments.ToArray());
            var wing    = new NewGroup()
            {
                DataContext = context
            };

            wing.ShowDialog();
            System.Console.WriteLine(context.Group != null);
            if (context.Group != null)
            {
                ClassGroups.Add(context.Group);
            }
        }
Beispiel #3
0
 private void Edit()
 {
     if (Index >= 0)
     {
         var group   = ClassGroups[Index];
         var context = new GroupVM(group, departments.ToArray());
         var wind    = new NewGroup()
         {
             DataContext = context
         };
         wind.ShowDialog();
         if (context.Group != null)
         {
             ClassGroups[Index] = context.Group;
         }
     }
 }
Beispiel #4
0
        private void Add()
        {
            var context = new GroupVM(departments.ToArray());
            var wind    = new NewGroup()
            {
                DataContext = context
            };

            wind.ShowDialog();
            if (wind.DialogResult == true)
            {
                if (context.Group != null)
                {
                    if (RequestToDataBase.Instance.requestInsertIntoGroup(context.Group))
                    {
                        ClassGroups.Add(context.Group);
                    }
                }
            }
        }
Beispiel #5
0
 private void Edit()
 {
     if (Index >= 0)
     {
         var group   = ClassGroups[Index];
         var context = new GroupVM(group, departments.ToArray());
         var wind    = new NewGroup()
         {
             DataContext = context
         };
         wind.ShowDialog();
         if (wind.DialogResult == true)
         {
             if (context.Group != null)
             {
                 if (RequestToDataBase.Instance.requestUpdateGroup(context.Group, ClassGroups, Index))
                 {
                     ClassGroups[Index] = context.Group;
                 }
             }
         }
     }
 }