// shows the form in edit modus // links: // docLink: http://sql2x.org/documentationLink/49afd26c-4f21-4992-967b-be190eacef77 public void ShowAsEdit(string defaultTestRunResultRcd) { var service = new CrudeDefaultTestRunResultRefServiceClient(); _isNew = false; try { _contract = service.FetchByDefaultTestRunResultRcd(defaultTestRunResultRcd); textBoxDefaultTestRunResult.Text = _contract.DefaultTestRunResultRcd; textBoxDefaultTestRunResultName.Text = _contract.DefaultTestRunResultName; _contract.DateTime = DateTime.UtcNow; dateTimePickerDateTime.Text = _contract.DateTime.ToString(); Show(); } catch (Exception ex) { if (ex == null) { } else { System.Diagnostics.Debugger.Break(); } } finally { service.Close(); } }
// saves the form // links: // docLink: http://sql2x.org/documentationLink/c9522930-91f8-4468-a936-8030bb2a6482 private void buttonSave_Click(object sender, EventArgs e) { var service = new CrudeDefaultTestRunResultRefServiceClient(); try { _contract.DefaultTestRunResultRcd = textBoxDefaultTestRunResult.Text; _contract.DefaultTestRunResultName = textBoxDefaultTestRunResultName.Text; if (_isNew) { service.Insert(_contract); } else { service.Update(_contract); } } catch (Exception ex) { if (ex == null) { } else { System.Diagnostics.Debugger.Break(); } } finally { service.Close(); } Close(); }
// refresh the grid // links: // docLink: http://sql2x.org/documentationLink/a90065e7-8ace-4de7-9367-d4653a7c637f public void RefreshCrudeDefaultTestRunResultRef() { var defaultTestRunResultRef = new CrudeDefaultTestRunResultRefServiceClient(); try { var bindingSource = new BindingSource(); bindingSource.DataSource = defaultTestRunResultRef.FetchWithFilter( textBoxDefaultTestRunResult.Text , textBoxDefaultTestRunResultName.Text , Guid.Empty , DateTime.MinValue ); dataGridViewCrudeDefaultTestRunResultRef.AutoGenerateColumns = false; dataGridViewCrudeDefaultTestRunResultRef.DataSource = bindingSource; dataGridViewCrudeDefaultTestRunResultRef.AutoResizeColumns(); dataGridViewCrudeDefaultTestRunResultRef.Refresh(); } catch (Exception ex) { if (ex == null) { } else { System.Diagnostics.Debugger.Break(); } } finally { defaultTestRunResultRef.Close(); } }
// fetch all rows from the SOAP layer and populate the ComboBox with it public void PopulateCombo() { if (!DesignMode && cboRef.DataSource == null) { CrudeDefaultTestRunResultRefServiceClient defaultTestRunResultRef = null; try { defaultTestRunResultRef = new CrudeDefaultTestRunResultRefServiceClient(); List <CrudeDefaultTestRunResultRefContract> contracts = defaultTestRunResultRef.FetchAll(); cboRef.DataSource = contracts; cboRef.DisplayMember = "DefaultTestRunResultName"; cboRef.ValueMember = "DefaultTestRunResultRcd"; } catch (Exception ex) { if (ex != null) { } } finally { if (defaultTestRunResultRef != null) { defaultTestRunResultRef.Close(); } } } }
public ActionResult CrudeDefaultTestRunResultRefEdit( System.String defaultTestRunResultRcd ) { CrudeDefaultTestRunResultRefContract contract = new CrudeDefaultTestRunResultRefServiceClient().FetchByDefaultTestRunResultRcd(defaultTestRunResultRcd); return(View( "~/Views/Crude/Default/CrudeDefaultTestRunResultRef/CrudeDefaultTestRunResultRefEdit.cshtml", contract )); }