private void departments_Click(object sender, RoutedEventArgs e) { if (selectedLocationID != 0) { NewDepartment newDepartments = new NewDepartment(selectedLocationID); newDepartments.Show(); } }
public ActionResult AddNewDepartment([FromBody] NewDepartment newDepartment) { var response = _departmentService.AddNewDepartment(newDepartment); if (!response.IsSuccessful) { return(BadRequest(response.Error)); } return(Ok()); }
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); } }
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; } } }
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); } } } }
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; } } } } }
public Response AddNewDepartment(NewDepartment newDepartment) { throw new NotImplementedException(); }