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

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

            return(Ok());
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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;
         }
     }
 }
Exemplo n.º 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);
                    }
                }
            }
        }
Exemplo n.º 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;
                 }
             }
         }
     }
 }
Exemplo n.º 7
0
 public Response AddNewDepartment(NewDepartment newDepartment)
 {
     throw new NotImplementedException();
 }