private bool fnValidateExpression(ref string strString, ref bool bIsNotCaseExpression) { try { strString = txtExpression.Text.Replace("Field.", "").Trim().ToUpper(); if (strString.StartsWith("=")) { strString = strString.Substring(1); } if (strString == "") { strString = "1=1"; } clsDataSource clsObj = new clsDataSource(); DataTable dtSource = clsObj.fnValidateExpressEditor(strString, strTabName, iExpressionFor); if (dtSource != null) { LabelParserResult.Text = "Success!"; LabelParserError.Text = ""; if (strString == "1=1") { strString = ""; txtExpression.Text = "="; } return(true); } return(false); } catch (Exception ex) { LabelParserResult.Text = "Constant: Failed!"; LabelParserError.Text = "Exception: " + ex.Message; throw ex; } }