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

            _isNew = false;
            try {
                _contract = service.FetchByProductInfoId(productInfoId);
                productInfoRefCombo.Text     = _contract.ProductInfoRcd != null ? _contract.ProductInfoRcd : String.Empty;
                textBoxProductInfoValue.Text = _contract.ProductInfoValue;
                _contract.DateTime           = DateTime.UtcNow;
                dateTimePickerDateTime.Text  = _contract.DateTime.ToString();

                Show();
            } catch (Exception ex) {
                if (ex == null)
                {
                }
                else
                {
                    System.Diagnostics.Debugger.Break();
                }
            } finally {
                service.Close();
            }
        }
Ejemplo n.º 2
0
        // bring up edit form for ProductInfo
        // links:
        //  docLink: http://sql2x.org/documentationLink/d7ff032d-3bcf-438f-9850-900ca0ebca98
        public void ShowAsEdit(System.Guid productInfoId)
        {
            var service = new CrudeProductInfoServiceClient();

            _isNew = false;
            try {
                _contract = service.FetchByProductInfoId(productInfoId);
                productInfoRefCombo.Text     = _contract.ProductInfoRcd != null ? _contract.ProductInfoRcd : String.Empty;
                textBoxProductInfoValue.Text = _contract.ProductInfoValue;
                _contract.DateTime           = DateTime.UtcNow;
                dateTimePickerDateTime.Text  = _contract.DateTime.ToString();

                RefreshProductInfo();
                Show();
            } catch (Exception ex) {
                MessageBox.Show(ex.Message);
            } finally {
                service.Close();
            }
        }