コード例 #1
0
        // shows the form in edit modus
        // links:
        //  docLink: http://sql2x.org/documentationLink/49afd26c-4f21-4992-967b-be190eacef77
        public void ShowAsEdit(string bookingIdentifierTypeRcd, System.Guid userId)
        {
            var service = new CrudeBookingIdentifierTypeRefServiceClient();

            _isNew = false;
            try {
                _contract = service.FetchByBookingIdentifierTypeRcd(bookingIdentifierTypeRcd);
                textBoxBookingIdentifierType.Text     = _contract.BookingIdentifierTypeRcd;
                textBoxBookingIdentifierTypeName.Text = _contract.BookingIdentifierTypeName;
                _contract.UserId            = 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();
            }
        }