public override void DataBind()
        {
            base.DataBind ();

            string username = ConfigurationManager.AppSettings["fcsdk.clarifysession.username"];

            // Show username to currect user
            currentUserLabel.Text = String.Format( " <i>({0})</i>", username );

            // Get session from Global.asax.cs
            ClarifySessionWS session = Global.ClarifySessWS;

            // Create ClarifyDataAccessWS
            ClarifyDataAccessWS dataAccess = new ClarifyDataAccessWS( session );

            // Create new DataQuery to query view "qry_case_view"
            DataQuery caseQuery = dataAccess.CreateDataQuery("qry_case_view");

            // Set fields to select
            caseQuery.DataFields.AddRange(
                new string[]{"id_number", "site_name", "title", "condition", "status", "creation_time", "owner"} );

            // Append filters for query
            caseQuery.AppendFilter( "owner", "Equals", username );
            caseQuery.AppendFilter( "condition", "Like", "Open%" );

            // Append sorting for query
            caseQuery.AppendSort( "creation_time", false );

            // Get Xml result
            string result = caseQuery.Query(true);

            // Create a string reader to read the result
            System.IO.StringReader reader = new System.IO.StringReader(result);

            // Create and load the DataSet with the result
            DataSet ds = new DataSet();
            ds.ReadXml( reader );

            // Data bind DataGrid to result table in DataSet
            this.openCasesGrid.DataSource = ds.Tables["qry_case_view"];
            this.openCasesGrid.DataBind();
        }
        public override void DataBind()
        {
            base.DataBind ();

            // Get session from Global.asax.cs
            ClarifySessionWS session = Global.ClarifySessWS;

            // Create ClarifyDataAccessWS
            ClarifyDataAccessWS dataAccess = new ClarifyDataAccessWS( session );

            // Create new DataQuery to query view "qry_case_view"
            DataQuery caseQuery = dataAccess.CreateDataQuery("qry_case_view");

            // Set fields to select
            caseQuery.DataFields.AddRange(
                new string[]{"id_number", "site_name", "title", "condition", "status", "creation_time", "owner"} );

            // Append filters for query
            caseQuery.AppendFilter( "creation_time", "MoreThanOrEqual", DateTime.Now.AddDays(DaysBack * -1).ToShortDateString() );

            // Append sorting for query
            caseQuery.AppendSort( "creation_time", false );

            // Get Xml result
            string result = caseQuery.Query(true);

            // Create a string reader to read the result
            System.IO.StringReader reader = new System.IO.StringReader(result);

            // Create and load the DataSet with the result
            DataSet ds = new DataSet();
            ds.ReadXml( reader );

            // Data bind DataGrid to result table in DataSet
            this.casesCreatedGrid.DataSource = ds.Tables["qry_case_view"];
            this.casesCreatedGrid.DataBind();
        }