private async void FilterUser() { string[] splitList = TbSearch.Split(new char[0], StringSplitOptions.RemoveEmptyEntries); List <EmployeeViewDTO> list = await new EmployeeService().FilterEmployeesRecord( new EmployeeFilterModel { Name = splitList.Count() >= 1 ? splitList[0] : "", Surname = splitList.Count() >= 2 ? splitList[1] : "", Patronumic = splitList.Count() == 3 ? splitList[2] : "", EmployeePostID = SelectedFilterPostId != 0? SelectedFilterPostId:0 }); DataGridListEmployees = ToObservableCollection <EmployeeViewDTO>(list); SelectIndexEmployeeDataGrid = 0; //EmployeeModel = SelectedCurentEmployeeDataGrid; EmployeePropertyViewModel = new PersonPropertyViewModel <EmployeeDTO>(SelectedCurentEmployeeDataGrid); }
private async void FilterUser() { string[] splitList = TbSearch.Split(new char[0], StringSplitOptions.RemoveEmptyEntries); List <UserViewDTO> list = await new UserService().FilterUsersRecord( new UserFilterModel { Name = splitList.Count() >= 1 ? splitList[0] : "", Surname = splitList.Count() >= 2 ? splitList[1] : "", Patronumic = splitList.Count() == 3 ? splitList[2] : "" }); DataGridListUsers = ToObservableCollection <UserViewDTO>(list); //UserViewModel = SelectedCurentClientDataGrid; SelectIndexDataGrid = 0; PersonViewModel = new PersonPropertyViewModel <UserDTO>(SelectedCurentClientDataGrid); }