// shows the form in edit modus // links: // docLink: http://sql2x.org/documentationLink/49afd26c-4f21-4992-967b-be190eacef77 public void ShowAsEdit(System.Guid defaultChangeLogId, System.Guid defaultUserId) { var service = new CrudeDefaultChangeLogServiceClient(); _isNew = false; try { _contract = service.FetchByDefaultChangeLogId(defaultChangeLogId); textBoxDefaultChangeName.Text = _contract.DefaultChangeName; textBoxDefaultChangeDescription.Text = _contract.DefaultChangeDescription; _contract.DefaultUserId = defaultUserId; dateTimePickerDateTime.Value = _contract.DateTime != DateTime.MinValue ? _contract.DateTime : dateTimePickerDateTime.MinDate; dateTimePickerDateTime.Checked = _contract.DateTime != DateTime.MinValue; defaultChangeLogTypeRefCombo.Text = _contract.DefaultChangeLogTypeRcd != null ? _contract.DefaultChangeLogTypeRcd : String.Empty; Show(); } catch (Exception ex) { if (ex == null) { } else { System.Diagnostics.Debugger.Break(); } } finally { service.Close(); } }
// shows the form with default values for comboboxes and pickers // links: // docLink: http://sql2x.org/documentationLink/f5685d96-a0bb-4f7b-beaa-b3d578c7cf28 public void ShowAsAdd(string defaultChangeName, string defaultChangeDescription, System.Guid defaultUserId, System.DateTime dateTime, string defaultChangeLogTypeRcd, System.Guid defaultIssueId) { try { _contract = new CrudeDefaultChangeLogContract(); _isNew = true; _contract.DefaultChangeName = defaultChangeName; textBoxDefaultChangeName.Text = _contract.DefaultChangeName; _contract.DefaultChangeDescription = defaultChangeDescription; textBoxDefaultChangeDescription.Text = _contract.DefaultChangeDescription; _contract.DefaultUserId = defaultUserId; _contract.DateTime = dateTime; dateTimePickerDateTime.Value = _contract.DateTime != DateTime.MinValue ? _contract.DateTime : dateTimePickerDateTime.MinDate; dateTimePickerDateTime.Checked = _contract.DateTime != DateTime.MinValue; _contract.DefaultChangeLogTypeRcd = defaultChangeLogTypeRcd; defaultChangeLogTypeRefCombo.Text = _contract.DefaultChangeLogTypeRcd != null ? _contract.DefaultChangeLogTypeRcd : String.Empty; _contract.DefaultIssueId = defaultIssueId; Show(); } catch (Exception ex) { if (ex == null) { } else { System.Diagnostics.Debugger.Break(); } } }
public ActionResult CrudeDefaultChangeLogCreate([Bind()] CrudeDefaultChangeLogContract contract) { if (ModelState.IsValid) { new CrudeDefaultChangeLogServiceClient().Insert(contract); return(RedirectToAction("CrudeDefaultChangeLogIndex")); } return(View( "~/Views/Crude/Default/CrudeDefaultChangeLog/CrudeDefaultChangeLogCreate.cshtml", contract )); }
public ActionResult CrudeDefaultChangeLogEdit([Bind()] CrudeDefaultChangeLogContract contract) { if (ModelState.IsValid) { contract.DefaultUserId = new System.Guid("{FFFFFFFF-5555-5555-5555-FFFFFFFFFFFF}"); new CrudeDefaultChangeLogServiceClient().Update(contract); return(RedirectToAction("CrudeDefaultChangeLogIndex")); } return(View( "~/Views/Crude/Default/CrudeDefaultChangeLog/CrudeDefaultChangeLogEdit.cshtml", contract )); }
// shows the form with default values for comboboxes and pickers // links: // docLink: http://sql2x.org/documentationLink/e04d0806-55ef-41cc-8669-acf0ddd850c7 public void ShowAsAdd() { try { _contract = new CrudeDefaultChangeLogContract(); _isNew = true; Show(); } catch (Exception ex) { if (ex == null) { } else { System.Diagnostics.Debugger.Break(); } } }
// shows the form with default values for comboboxes and pickers // links: // docLink: http://sql2x.org/documentationLink/e04d0806-55ef-41cc-8669-acf0ddd850c7 public void ShowAsAdd() { try { _contract = new CrudeDefaultChangeLogContract(); _isNew = true; this.Text += " - Not Savable (DefaultUser Missing)"; Show(); } catch (Exception ex) { if (ex == null) { } else { System.Diagnostics.Debugger.Break(); } } }
// shows by foreign keys // links: // docLink: http://sql2x.org/documentationLink/f21e72c1-2d57-44c1-a9c1-1b80bad6a391 public void ShowAsAddByDefaultChangeLogType(string defaultChangeLogTypeRcd) { try { _contract = new CrudeDefaultChangeLogContract(); _isNew = true; _contract.DefaultChangeLogTypeRcd = defaultChangeLogTypeRcd; defaultChangeLogTypeRefCombo.Text = _contract.DefaultChangeLogTypeRcd != null ? _contract.DefaultChangeLogTypeRcd : String.Empty; Show(); } catch (Exception ex) { if (ex == null) { } else { System.Diagnostics.Debugger.Break(); } } }
public ActionResult CrudeDefaultChangeLogCreate(System.Guid?defaultUserId, System.Guid?defaultIssueId) { var contract = new CrudeDefaultChangeLogContract(); if (defaultUserId != null) { contract.DefaultUserId = (System.Guid)defaultUserId; } if (defaultIssueId != null) { contract.DefaultIssueId = (System.Guid)defaultIssueId; } if (defaultUserId == null) { contract.DefaultUserId = new System.Guid("{FFFFFFFF-5555-5555-5555-FFFFFFFFFFFF}"); } contract.DateTime = DateTime.UtcNow; ViewBag.DefaultChangeLogTypeRcd = new SelectList(new CrudeDefaultChangeLogTypeRefServiceClient().FetchAll(), "DefaultChangeLogTypeRcd", "DefaultChangeLogTypeName", contract.DefaultChangeLogTypeRcd ); ViewBag.DefaultIssueId = new SelectList(new CrudeDefaultIssueServiceClient().FetchAll(), "DefaultIssueId", "IssueName", contract.DefaultIssueId ); return(View( "~/Views/Crude/Default/CrudeDefaultChangeLog/CrudeDefaultChangeLogCreate.cshtml", contract )); }