예제 #1
0
 private void departments_Click(object sender, RoutedEventArgs e)
 {
     if (selectedLocationID != 0)
     {
         NewDepartment newDepartments = new NewDepartment(selectedLocationID);
         newDepartments.Show();
     }
 }
예제 #2
0
        public ActionResult AddNewDepartment([FromBody] NewDepartment newDepartment)
        {
            var response = _departmentService.AddNewDepartment(newDepartment);

            if (!response.IsSuccessful)
            {
                return(BadRequest(response.Error));
            }

            return(Ok());
        }
예제 #3
0
        private void Add()
        {
            var context = new DepartmentVM(facultities.ToArray());
            var wind    = new NewDepartment()
            {
                DataContext = context
            };

            wind.ShowDialog();
            System.Console.WriteLine(context.Department != null);
            if (context.Department != null)
            {
                ClassDepartment.Add(context.Department);
            }
        }
예제 #4
0
 private void Edit()
 {
     if (Index >= 0)
     {
         var department = ClassDepartment[Index];
         var context    = new DepartmentVM(department, facultities.ToArray());
         var wind       = new NewDepartment()
         {
             DataContext = context
         };
         wind.ShowDialog();
         if (context.Department != null)
         {
             ClassDepartment[Index] = context.Department;
         }
     }
 }
예제 #5
0
        private void Add()
        {
            var context = new DepartmentVM(facultities.ToArray());
            var wind    = new NewDepartment()
            {
                DataContext = context
            };

            wind.ShowDialog();
            if (wind.DialogResult == true)
            {
                if (context.Department != null)
                {
                    if (RequestToDataBase.Instance.requestInsertIntoDepartment(context.Department))
                    {
                        ClassDepartment.Add(context.Department);
                    }
                }
            }
        }
예제 #6
0
 private void Edit()
 {
     if (Index >= 0)
     {
         var department = ClassDepartment[Index];
         var context    = new DepartmentVM(department, facultities.ToArray());
         var wind       = new NewDepartment()
         {
             DataContext = context
         };
         wind.ShowDialog();
         if (wind.DialogResult == true)
         {
             if (context.Department != null)
             {
                 if (RequestToDataBase.Instance.requestUpdateDepartment(context.Department, ClassDepartment, Index))
                 {
                     ClassDepartment[Index] = context.Department;
                 }
             }
         }
     }
 }
예제 #7
0
 public Response AddNewDepartment(NewDepartment newDepartment)
 {
     throw new NotImplementedException();
 }