public BusStopDetails(ClientCredentials clientCredentials)
        {
            InitializeComponent();
            ActualBusStop = new BusStop();

            busStopService = new BusStopServiceClient();

            busStopSecureService = new BusStopSecureServiceClient();
            busStopSecureService.ClientCredentials.UserName.UserName = clientCredentials.UserName.UserName;
            busStopSecureService.ClientCredentials.UserName.Password = clientCredentials.UserName.Password;

            busStopTypeService = new BusStopTypeServiceClient();
            busStopTypeService.ClientCredentials.UserName.UserName = clientCredentials.UserName.UserName;
            busStopTypeService.ClientCredentials.UserName.Password = clientCredentials.UserName.Password;

            busStopTypeSecureService = new BusStopTypeSecureServiceClient();
            busStopTypeSecureService.ClientCredentials.UserName.UserName = clientCredentials.UserName.UserName;
            busStopTypeSecureService.ClientCredentials.UserName.Password = clientCredentials.UserName.Password;

            BusStopTypeComboBox.ItemsSource = busStopTypeService.GetAll();

            OpenAllTextBoxes();
            SaveButton.IsEnabled = true;
            EditButton.IsEnabled = false;
            DeleteButton.IsEnabled = false;

            IsAddingNewObject = true;
        }
        public BusStopDetails(ClientCredentials clientCredentials, BusStop busStop)
        {
            InitializeComponent();
            ActualBusStop = busStop;

            busStopService = new BusStopServiceClient();

            busStopSecureService = new BusStopSecureServiceClient();
            busStopSecureService.ClientCredentials.UserName.UserName = clientCredentials.UserName.UserName;
            busStopSecureService.ClientCredentials.UserName.Password = clientCredentials.UserName.Password;

            busStopTypeService = new BusStopTypeServiceClient();
            busStopTypeService.ClientCredentials.UserName.UserName = clientCredentials.UserName.UserName;
            busStopTypeService.ClientCredentials.UserName.Password = clientCredentials.UserName.Password;

            busStopTypeSecureService = new BusStopTypeSecureServiceClient();
            busStopTypeSecureService.ClientCredentials.UserName.UserName = clientCredentials.UserName.UserName;
            busStopTypeSecureService.ClientCredentials.UserName.Password = clientCredentials.UserName.Password;

            BusStopTypeComboBox.ItemsSource = busStopTypeService.GetAll();
            FillData();
            SaveButton.IsEnabled = false;
        }