Example #1
0
        // shows the form in edit modus
        // links:
        //  docLink: http://sql2x.org/documentationLink/49afd26c-4f21-4992-967b-be190eacef77
        public void ShowAsEdit(System.Guid airportSupplierLinkId)
        {
            var service = new CrudeAirportSupplierLinkServiceClient();

            _isNew = false;
            try {
                _contract = service.FetchByAirportSupplierLinkId(airportSupplierLinkId);
                airportPicker.SelectedValue = _contract.AirportId;
                userPicker.SelectedValue    = _contract.UserId;
                _contract.DateTime          = DateTime.UtcNow;
                dateTimePickerDateTime.Text = _contract.DateTime.ToString();

                Show();
            } catch (Exception ex) {
                if (ex == null)
                {
                }
                else
                {
                    System.Diagnostics.Debugger.Break();
                }
            } finally {
                service.Close();
            }
        }