Ejemplo n.º 1
0
        private void BuildSearchContactWindow()
        {
            contactPicker       = new searchCustomer(searchCustomerTypeEnum.Contact);
            contactPicker_VM    = contactPicker.DataContext as searchCustomer_ModelView;
            contactPickerWindow = new Window()
            {
                Title         = "Kapcsolattartó választó",
                Content       = contactPicker,
                SizeToContent = SizeToContent.WidthAndHeight
            };

            contactPicker_VM.CustomerSelected += (s, a) =>
            {
                DataProxy.Instance.AddContact(viewModel.selectedCustomer, (PersonRepresentation)s);
                ((FirmRepresentation)viewModel.selectedCustomer).contacts.Add((CustomerBaseRepresentation)s);
                contactPickerWindow.Hide();
            };
        }
Ejemplo n.º 2
0
        private void BuildSearchCustomerWindow()
        {
            if (customerPicker == null)
            {
                customerPicker    = new searchCustomer(searchCustomerTypeEnum.Customer);
                customerPicker_VM = customerPicker.DataContext as searchCustomer_ModelView;
            }
            customerPickerWindow = new Window()
            {
                Title         = "Ügyfél választó",
                Content       = customerPicker,
                SizeToContent = SizeToContent.WidthAndHeight
            };

            customerPicker_VM.CustomerSelected += (s, a) =>
            {
                viewModel.selectedCustomer = (CustomerBaseRepresentation)s;
                customerPickerWindow.Hide();
            };
        }
Ejemplo n.º 3
0
        private void BuildSearchCustomerWindow()
        {
            if (customerPicker == null)
            {
                customerPicker = new searchCustomer(searchCustomerTypeEnum.Customer);
                customerPicker_VM = customerPicker.DataContext as searchCustomer_ModelView;
            }
            customerPickerWindow = new Window()
            {
                Title = "Ügyfél választó",
                Content = customerPicker,
                SizeToContent = SizeToContent.WidthAndHeight
            };

            customerPicker_VM.CustomerSelected += (s, a) =>
            {
                viewModel.selectedCustomer = (CustomerBaseRepresentation)s;
                customerPickerWindow.Hide();
            };
        }
Ejemplo n.º 4
0
        private void BuildSearchContactWindow()
        {
            contactPicker = new searchCustomer(searchCustomerTypeEnum.Contact);
            contactPicker_VM = contactPicker.DataContext as searchCustomer_ModelView;
            contactPickerWindow = new Window()
            {
                Title = "Kapcsolattartó választó",
                Content = contactPicker,
                SizeToContent = SizeToContent.WidthAndHeight
            };

            contactPicker_VM.CustomerSelected += (s, a) =>
            {
                DataProxy.Instance.AddContact(viewModel.selectedCustomer, (PersonRepresentation)s);
                ((FirmRepresentation)viewModel.selectedCustomer).contacts.Add((CustomerBaseRepresentation)s);
                contactPickerWindow.Hide();
            };
        }