Example #1
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);
            }
        }
Example #2
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;
         }
     }
 }
Example #3
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);
                    }
                }
            }
        }
Example #4
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;
                 }
             }
         }
     }
 }