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 financialAdjustmentId)
        {
            var service = new CrudeFinancialAdjustmentServiceClient();

            _isNew = false;
            try {
                _contract = service.FetchByFinancialAdjustmentId(financialAdjustmentId);
                financialAdjustmentTypeRefCombo.Text  = _contract.FinancialAdjustmentTypeRcd != null ? _contract.FinancialAdjustmentTypeRcd : String.Empty;
                maskedTextBoxAmount.Text              = _contract.Amount.ToString();
                financialCurrencyPicker.SelectedValue = _contract.FinancialCurrencyId;
                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();
            }
        }