HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/TDijk1/erp-apps.eu/wwwroot/App_Code/Vendor/VendorTreeNodeProvider.cs
//--------------------------------------------------------------------------------------------------
// <auto-generated>
//
//     This code was generated by code generator tool.
//
//     To customize the code use your own partial class. For more info about how to use and customize
//     the generated code see the documentation at http://docs.kentico.com.
//
// </auto-generated>
//--------------------------------------------------------------------------------------------------

using System;
using System.Data;

using CMS.Base;
using CMS.DataEngine;
using CMS.DocumentEngine;
using CMS.Helpers;

namespace ERP.Vendor
{
    /// <summary>
    /// Provides methods for retrieving pages of type Vendor.
    /// </summary>
    public partial class VendorTreeNodeProvider
    {
        /// <summary>
        /// Returns a query that selects published pages of type Vendor.
        /// </summary>
        public static DocumentQuery<VendorTreeNode> GetVendors()
        {
            return DocumentHelper.GetDocuments<VendorTreeNode>().PublishedVersion().Published();
        }


        /// <summary>
        /// Returns a published page of type Vendor that matches the specified criteria.
        /// </summary>
        /// <param name="nodeId">The identifier of the content tree node that represents the page.</param>
        /// <param name="siteName">The name of the site where the page belongs.</param>
        /// <param name="cultureName">The name of the language, e.g. en-US, that determines which localized version should be retrieved.</param>
        public static DocumentQuery<VendorTreeNode> GetVendor(int nodeId, string cultureName, string siteName)
        {
            return GetVendors().OnSite(siteName).Culture(cultureName).WhereEquals("NodeID", nodeId);
        }


        /// <summary>
        /// Returns a published page of type Vendor that matches the specified criteria.
        /// </summary>
        /// <param name="nodeGuid">The globally unique identifier of the content tree node that represents the page.</param>
        /// <param name="siteName">The name of the site where the page belongs.</param>
        /// <param name="cultureName">The name of the language, e.g. en-US, that determines which localized version should be retrieved.</param>
        public static DocumentQuery<VendorTreeNode> GetVendor(Guid nodeGuid, string cultureName, string siteName)
        {
            return GetVendors().OnSite(siteName).Culture(cultureName).WhereEquals("NodeGUID", nodeGuid);
        }


        /// <summary>
        /// Returns a published page of type Vendor that matches the specified criteria.
        /// </summary>
        /// <param name="nodeAliasPath">The alias path to the content tree node that represents the page.</param>
        /// <param name="siteName">The name of the site where the page belongs.</param>
        /// <param name="cultureName">The name of the language, e.g. en-US, that determines which localized version should be retrieved.</param>
        public static DocumentQuery<VendorTreeNode> GetVendor(string nodeAliasPath, string cultureName, string siteName)
        {
            return GetVendors().OnSite(siteName).Culture(cultureName).Path(nodeAliasPath);
        }

    }
}