public void AddTest() { VerifyDoesntExist(); bool value = CustomReports.Add(_databasePath, _crReportName, _crSql, out _errOut); General.HasTrueValue(value, _errOut); }
/// <summary> /// Verifies the exists. /// </summary> private void VerifyExists() { if (!CustomReports.Exists(_databasePath, _crReportName, out _errOut)) { CustomReports.Add(_databasePath, _crReportName, _crSql, out _errOut); } }
internal void LoadComponents() { // Get all the report components registered in our category foreach (var component in Categories.GetComponentElements("AcmeCustom_Reports")) { try { //access the content element var content = component.GetContent(); var version = content.Attribute("version").Value; //get the underlying report and test for the presence of //the contract var reportItem = component.CreateComponent() as IAcmeCustomReport; if (reportItem != null) { CustomReports.Add(reportItem); } } catch (Exception e) { //TODO handle exception as needed string x = e.Message; } } }