spc-kiosk-pb/Library/CommonManager/MasterListManager.cs

144 lines
4.5 KiB
C#
Raw Normal View History

2019-06-16 05:12:09 +00:00
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.CommonManager
{
/// <summary>
/// 다운타입 별 마스터 리스트 관리자
/// </summary>
public class MasterListManager
{
/// <summary>
/// Normal Down Master List
/// </summary>
private static Hashtable m_htNormalMaster = new Hashtable();
/// <summary>
/// Complex Store Down Master List
/// </summary>
private static Hashtable m_htComplexStorMaster = new Hashtable();
/// <summary>
/// Background Down Master List
/// </summary>
private static Hashtable m_htBackgroundMaster = new Hashtable();
/// <summary>
/// Sub POS Down Master List
/// </summary>
private static Hashtable m_htSubPosMaster = new Hashtable();
/// <summary>
/// Campaign Master List
/// </summary>
private static Hashtable m_htCampaignMaster = new Hashtable();
/// <summary>
/// 프로그램 기동 시 다운 받을 마스터ID 리스트 설정
/// </summary>
/// <param name="aMasterList"></param>
public static void SetNormalMaster(string[] aMasterList)
{
int iKey = 0;
foreach (string master in aMasterList)
{
m_htNormalMaster.Add(iKey++, master);
}
}
/// <summary>
/// 복합매장일 겨우 다운 받을 마스터ID 리스트 설정
/// </summary>
/// <param name="aMasterList"></param>
public static void SetComplexStorMaster(string[] aMasterList)
{
int iKey = 0;
foreach (string master in aMasterList)
{
m_htComplexStorMaster.Add(iKey++, master);
}
}
/// <summary>
/// Background에서 다운 받을 마스터ID 리스트 설정
/// </summary>
/// <param name="aMasterList"></param>
public static void SetBackgroundMaster(string[] aMasterList)
{
int iKey = 0;
foreach (string master in aMasterList)
{
m_htBackgroundMaster.Add(iKey++, master);
}
}
/// <summary>
/// Sub POS에서 다운 받을 마스터ID 리스트 설정
/// </summary>
/// <param name="aMasterList"></param>
public static void SetSubPosMaster(string[] aMasterList)
{
int iKey = 0;
foreach(string master in aMasterList)
{
m_htSubPosMaster.Add(iKey++, master);
}
}
/// <summary> SetCampaignMaster </summary>
public static void SetCampaignMaster(string[] aMasterList)
{
int iKey = 0;
foreach(string master in aMasterList)
{
m_htCampaignMaster.Add(iKey++, master);
}
}
/// <summary>
/// 프로그램 기동 시 다운 받을 마스터ID 리스트 반환
/// </summary>
/// <returns></returns>
public static Hashtable GetNormalMaster()
{
return m_htNormalMaster;
}
/// <summary>
/// 복합매장일 경우 다운 받을 마스터ID 리스트 반환
/// </summary>
/// <returns></returns>
public static Hashtable GetComplexStorMaster()
{
return m_htComplexStorMaster;
}
/// <summary>
/// Background에서 다운 받을 마스터ID 리스트 반환
/// </summary>
/// <returns></returns>
public static Hashtable GetBackgroundMaster()
{
return m_htBackgroundMaster;
}
/// <summary>
/// Sub POS에서 다운 받을 마스터ID 리스트 반환
/// </summary>
/// <returns></returns>
public static Hashtable GetSubPosMaster()
{
return m_htSubPosMaster;
}
/// <summary> GetCampaignMaster </summary>
public static Hashtable GetCampaignMaster()
{
return m_htCampaignMaster;
}
/// <summary>
/// Background에서 다운 받는 마스터인지 여부 반환
/// </summary>
/// <param name="sMasterId"></param>
/// <returns></returns>
public static bool IsBackgroundMaster(string sMasterId)
{
return m_htBackgroundMaster.ContainsValue(sMasterId);
}
}
}