Beispiel #1
0
        protected void cmdQueryTest_Click(object sender, EventArgs e)
        {
            var msg     = "";
            var isValid = Convert.ToBoolean(Services.Data.Query.IsQueryValid(txtCommand.Text, ConnectionController.GetConnectionString(Convert.ToInt32(cpConnection.ConnectionId), ReportSetId), ref msg));

            lblQueryTestResults.Text     = msg;
            lblQueryTestResults.CssClass = "NormalGreen";
            if (!isValid)
            {
                lblQueryTestResults.CssClass = "NormalRed";
            }
        }
Beispiel #2
0
        protected void vldCommand_ServerValidate(Object source, System.Web.UI.WebControls.ServerValidateEventArgs args)
        {
            var msg = "";

            args.IsValid            = Convert.ToBoolean(Services.Data.Query.IsQueryValid(txtCommand.Text, ConnectionController.GetConnectionString(Convert.ToInt32(cpConnection.ConnectionId), ReportSetId), ref msg));
            vldCommand.ErrorMessage = msg;
        }