void Delete(object sender, RoutedEventArgs e) { ServiceAppModel offer = (ServiceAppModel)servicesTable.SelectedItem; if (_proxyOffer.DeleteServiceOffer(offer.Id)) { GetAll(); } else { MessageBox.Show("Can't find service", "Can't find service"); } }
public Services() { InitializeComponent(); _proxyOffer = new TcpOfferReference.OfferServiceClient("OfferServiceTcpEndpoint"); _proxyUser = new TcpUserReference.UserServiceClient("UserServiceTcpEndpoint"); var config = new MapperConfiguration(cfg => { cfg.CreateMap <ServiceAppModel, Offer>(); }); _mapper = config.CreateMapper(); _serviceOffer = new ServiceAppModel(); GetAll(); Init(); }
private void GoToEmployee(object sender, RoutedEventArgs e) { ServiceAppModel offer = (ServiceAppModel)servicesTable.SelectedItem; new Users(_mapper.Map(offer.Author, new UserAppModel())); }