コード例 #1
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            this.ServiceProvisions = _service.GetAll();
            var usr  = _userService.GetAll();
            var srvs = _serviceService.GetAll();
            var clnt = _clientService.GetAll();

            ServiceProvisions.ForEach(s => s.Client  = clnt.FirstOrDefault(c => c.Id == s.ClientId));
            ServiceProvisions.ForEach(s => s.Master  = usr.FirstOrDefault(u => u.Id == s.MasterId));
            ServiceProvisions.ForEach(s => s.Service = srvs.FirstOrDefault(ss => ss.Id == s.ServiceId));
        }
コード例 #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.ServiceProvisions = _service.GetAll();
            var usr  = _userService.GetAll();
            var srvs = _serviceService.GetAll();
            var clnt = _clientService.GetAll();

            ServiceProvisions.ForEach(s => s.Client  = clnt.FirstOrDefault(c => c.Id == s.ClientId));
            ServiceProvisions.ForEach(s => s.Master  = usr.FirstOrDefault(u => u.Id == s.MasterId));
            ServiceProvisions.ForEach(s => s.Service = srvs.FirstOrDefault(ss => ss.Id == s.ServiceId));


            servicesGrid.ItemsSource   = ServiceProvisions;
            servicesGrid.SelectedIndex = 0;
        }