Show / Hide Table of Contents

    DwModelManager.GetDwModelType(string name) Method

    .NET Standard 2.x

    Gets the model type corresponding to the DataWindow.

    Namespace: DWNet.Data

    Assembly: DWNet.Data.dll

    Syntax

    public static Type GetDwModelType(string name);
    

    Parameters

    name System.String

    The name of the DataWindow.

    Returns

    System.Type

    Returns the model type corresponding to the DataWindow.

    Examples

    The following code example demonstrates how to use GetDwModelType to get the corresponding model type in DataWindow.

    using DWNet.Data;
    using System;
    
    namespace Appeon.ApiDoc.DwModelManagerExamples
    {
        public class GetDwModelTypeExample
        {
            public GetDwModelTypeExample()
            {
            }
    
            public void Example()
            {
                // Loads all DataWindows in the assembly for the current class
                DwModelManager.LoadDwModels();
                // Gets the model type in DataWindow which corresponds to d_department.
                var type = DwModelManager.GetDwModelType("d_department");
    
                Console.WriteLine($"type FullName={type.FullName}");
    
                /*This code produces the following output:
                
                type name=Appeon.ApiDoc.Models.D_Department           
                */
            }
        }
    }
    

    Example Refer To

    Model Class: D_Department
    DataWindow File: d_department

    Back to top Generated by Appeon