57 lines
2.2 KiB
C#
57 lines
2.2 KiB
C#
using Sarand.Net.Standard.Base.Core;
|
|
using Sarand.Net.Standard.Base.Bus;
|
|
using Sarand.Net.Standard.Base.Dbas;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Sarand.Net.Standard.Base.ReferenceData
|
|
{
|
|
//=======================================================================
|
|
// Reference Data Console - Regions.
|
|
//=======================================================================
|
|
partial class SaReferenceDataConsole
|
|
{
|
|
// Definitions.
|
|
public class RegionInitData
|
|
{
|
|
public SaRegionType Type { get; set; } = SaRegionType.Unknown;
|
|
public String Name { get; set; } = "";
|
|
public String CurrencyCode { get; set; } = "";
|
|
public SaRegionType ParentType { get; set; } = SaRegionType.Unknown;
|
|
public String ParentName { get; set; } = "";
|
|
}
|
|
|
|
// Utilities.
|
|
/// <summary>Return the valid parent type for the specified Region type.</summary>
|
|
public static SaRegionType ParentTypeFor(SaRegionType regionType)
|
|
{
|
|
return SaReferenceDataMgr.ParentTypeFor(regionType);
|
|
}
|
|
/// <summary>Return the valid subordinate Region type for the specified Region type.</summary>
|
|
public static SaRegionType SubordinateTypeFor(SaRegionType regionType)
|
|
{
|
|
return SaReferenceDataMgr.SubordinateTypeFor(regionType);
|
|
}
|
|
|
|
// Properties.
|
|
public abstract short RegionItemType { get; }
|
|
public abstract String TableName_Region { get; }
|
|
public abstract bool DatabaseIsValid_Region { get; }
|
|
|
|
// Retrieve Region.
|
|
public abstract SaRegion GetRegion(SaRegion.Params prmRegion);
|
|
|
|
// Region list.
|
|
public abstract ColumnDfn GetRegionColumnDfn(SaRegion.Column columnId, String caption = "", int width = 0);
|
|
public abstract List<String> GetRegionQueryFilter(SaRegion.Params prm);
|
|
public abstract long GetRegionCount(SaRegion.Params prmRegion);
|
|
public abstract List<SaRegion> GetRegionList(SaRegion.Params prmRegion);
|
|
public abstract DbResultSet ExecuteRegionQuery(List<ColumnDfn> columns, SaRegion.Params prm);
|
|
public abstract DataValue GetRegionDataValue(ColumnDfn column, NamedValue.Map values);
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|