Show / Hide Table of Contents

    IDataStore.RetrieveEnd Event

    .NET Standard 2.x | Current Version (1.0.1)

    0.5.0-alpha

    1.0.1 (current)

    Occurs when the retrieval is completed.

    Namespace: PowerBuilder.Data

    Assembly: PowerBuilder.Data.dll

    Syntax

      public event Action<object, DwRetrieveEventArgs> OnRetrieveEnd;
    

    Remarks

    The number of rows retrieved in the DwRetrieveEventArgs.RowCount argument is an unfiltered value.

    Examples

    The following code example demonstrates that the RetrieveEnd event is triggered when DataStore finished retrieving data.

    using PowerBuilder.Data;
    using System;
    
    namespace Appeon.ApiDoc.IDataStoreExamples
    {
        public class RetrieveEndExample
        {
            private SchoolContext _context;
    
            public RetrieveEndExample(SchoolContext dataContext)
            {
                // Sets the data context.
                _context = dataContext;
            }
    
            public void Example()
            {
                // Instantiates datastore with datawindow: d_department
                var department = new DataStore("d_department", _context);
    
                // Defines what to do after retrieval completes.
                department.RetrieveEnd +=
                    (object sender, DwRetrieveEventArgs args) =>
                    {
                        Console.WriteLine("Retrieve Count = {0}", args.RowCount);
                    };
    
                department.Retrieve();
    
                /*This code produces the following output:
                
                Retrieve Count = 4
                */
            }
        }
    }
    

    Example Refer To

    Model Class: D_Department
    DataWindow File: d_department

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon