Esempio n. 1
0
        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");
            }
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        private void GoToEmployee(object sender, RoutedEventArgs e)
        {
            ServiceAppModel offer = (ServiceAppModel)servicesTable.SelectedItem;

            new Users(_mapper.Map(offer.Author, new UserAppModel()));
        }