} // getInfoOperator /// <summary> ///Get Display with optional To /// </summary> /// <param name="index"></param> /// <returns></returns> public String GetInfoDisplayAll(int index) { if (index < 0 || index >= _list.Count) { return(null); } QueryRestriction r = _list[index]; try { if (r.Code.GetType().FullName == "System.DateTime") { if (r.InfoDisplay.IndexOf("T") > 0) { r.InfoDisplay = r.InfoDisplay.Substring(0, r.InfoDisplay.IndexOf("T")); r.InfoDisplay_to = r.InfoDisplay_to.Substring(0, r.InfoDisplay_to.IndexOf("T")); } } } catch { } return(r.GetInfoDisplayAll()); }
} // getCode /// <summary> /// Get printable Query Info /// </summary> /// <returns></returns> public String GetInfo() { StringBuilder sb = new StringBuilder(); if (_tableName != null) { sb.Append(_tableName).Append(": "); } // for (int i = 0; i < _list.Count; i++) { QueryRestriction r = _list[i]; if (i != 0) { sb.Append(r.AndCondition ? " AND " : " OR "); } // sb.Append(r.GetInfoName()) .Append(r.GetInfoOperator()) .Append(r.GetInfoDisplayAll()); } return(sb.ToString()); } // getInfo