﻿
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.ComponentModel;
using System.Linq;
using Softv.Providers;
using Softv.Entities;
using Globals;

/// <summary>
/// Class                   : Softv.BAL.Client.cs
/// Generated by            : Class Generator (c) 2014
/// Description             : CatalogoPeriodosCorteBussines
/// File                    : CatalogoPeriodosCorteBussines.cs
/// Creation date           : 20/05/2016
/// Creation time           : 06:36 p. m.
///</summary>
namespace Softv.BAL
{

    [DataObject]
    [Serializable]
    public class CatalogoPeriodosCorte
    {

        #region Constructors
        public CatalogoPeriodosCorte() { }
        #endregion

        /// <summary>
        ///Adds CatalogoPeriodosCorte
        ///</summary>
        [DataObjectMethod(DataObjectMethodType.Insert, true)]
        public static int Add(CatalogoPeriodosCorteEntity objCatalogoPeriodosCorte)
        {
            int result = ProviderSoftv.CatalogoPeriodosCorte.AddCatalogoPeriodosCorte(objCatalogoPeriodosCorte);
            return result;
        }

        /// <summary>
        ///Delete CatalogoPeriodosCorte
        ///</summary>
        [DataObjectMethod(DataObjectMethodType.Delete, true)]
        public static int Delete(int? Clv_Periodo)
        {
            int resultado = ProviderSoftv.CatalogoPeriodosCorte.DeleteCatalogoPeriodosCorte(Clv_Periodo);
            return resultado;
        }

        /// <summary>
        ///Update CatalogoPeriodosCorte
        ///</summary>
        [DataObjectMethod(DataObjectMethodType.Update, true)]
        public static int Edit(CatalogoPeriodosCorteEntity objCatalogoPeriodosCorte)
        {
            int result = ProviderSoftv.CatalogoPeriodosCorte.EditCatalogoPeriodosCorte(objCatalogoPeriodosCorte);
            return result;
        }

        /// <summary>
        ///Get CatalogoPeriodosCorte
        ///</summary>
        [DataObjectMethod(DataObjectMethodType.Select, true)]
        public static List<CatalogoPeriodosCorteEntity> GetAll()
        {
            List<CatalogoPeriodosCorteEntity> entities = new List<CatalogoPeriodosCorteEntity>();
            entities = ProviderSoftv.CatalogoPeriodosCorte.GetCatalogoPeriodosCorte();

            return entities ?? new List<CatalogoPeriodosCorteEntity>();
        }

        /// <summary>
        ///Get CatalogoPeriodosCorte List<lid>
        ///</summary>
        [DataObjectMethod(DataObjectMethodType.Select, true)]
        public static List<CatalogoPeriodosCorteEntity> GetAll(List<int> lid)
        {
            List<CatalogoPeriodosCorteEntity> entities = new List<CatalogoPeriodosCorteEntity>();
            entities = ProviderSoftv.CatalogoPeriodosCorte.GetCatalogoPeriodosCorte(lid);
            return entities ?? new List<CatalogoPeriodosCorteEntity>();
        }

        /// <summary>
        ///Get CatalogoPeriodosCorte By Id
        ///</summary>
        [DataObjectMethod(DataObjectMethodType.Select)]
        public static CatalogoPeriodosCorteEntity GetOne(int? Clv_Periodo)
        {
            CatalogoPeriodosCorteEntity result = ProviderSoftv.CatalogoPeriodosCorte.GetCatalogoPeriodosCorteById(Clv_Periodo);

            return result;
        }

        /// <summary>
        ///Get CatalogoPeriodosCorte By Id
        ///</summary>
        [DataObjectMethod(DataObjectMethodType.Select)]
        public static CatalogoPeriodosCorteEntity GetOneDeep(int? Clv_Periodo)
        {
            CatalogoPeriodosCorteEntity result = ProviderSoftv.CatalogoPeriodosCorte.GetCatalogoPeriodosCorteById(Clv_Periodo);

            return result;
        }



        /// <summary>
        ///Get CatalogoPeriodosCorte
        ///</summary>
        [DataObjectMethod(DataObjectMethodType.Select, true)]
        public static SoftvList<CatalogoPeriodosCorteEntity> GetPagedList(int pageIndex, int pageSize)
        {
            SoftvList<CatalogoPeriodosCorteEntity> entities = new SoftvList<CatalogoPeriodosCorteEntity>();
            entities = ProviderSoftv.CatalogoPeriodosCorte.GetPagedList(pageIndex, pageSize);

            return entities ?? new SoftvList<CatalogoPeriodosCorteEntity>();
        }

        /// <summary>
        ///Get CatalogoPeriodosCorte
        ///</summary>
        [DataObjectMethod(DataObjectMethodType.Select, true)]
        public static SoftvList<CatalogoPeriodosCorteEntity> GetPagedList(int pageIndex, int pageSize, String xml)
        {
            SoftvList<CatalogoPeriodosCorteEntity> entities = new SoftvList<CatalogoPeriodosCorteEntity>();
            entities = ProviderSoftv.CatalogoPeriodosCorte.GetPagedList(pageIndex, pageSize, xml);

            return entities ?? new SoftvList<CatalogoPeriodosCorteEntity>();
        }


    }




    #region Customs Methods

    #endregion
}
