public bool AddQuery(int id, string queryTemplate, string queryName, string queryDesc) { if (getStorageItem(id) != null) { return(false); } var qsi = new QueryStorageItem(); qsi.SetQueryProperties(queryTemplate, queryName, queryDesc); this.queries.Add(id, qsi); return(true); }
public bool UpdateQueryParameter(int id, string paramName, string paramValue) { if (!this.queries.Keys.Contains(id) || string.IsNullOrEmpty(paramName)) { return(false); } bool rt = true; QueryStorageItem qsi = getStorageItem(id); if (qsi == null || !qsi.UpdateParameter(paramName, paramValue)) { //Could not update a query parameter //TODO: Log error and report exception rt = false; } return(rt); }
public bool AddQueryParameter(int id, string paramName, string paramTypeName, string paramInitialValue) { if (CollectionUtilities.isEmpty(this.queries) || !this.queries.ContainsKey(id) || string.IsNullOrEmpty(paramName) || string.IsNullOrEmpty(paramTypeName)) { return(false); } bool rt = true; QueryStorageItem qsi = getStorageItem(id); if (qsi == null || !qsi.AddParameter(paramName, paramTypeName, paramInitialValue)) { //Could not add parameter to query //TODO: Log error and report exception rt = false; } return(rt); }