942 lines
31 KiB
C#
942 lines
31 KiB
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.IO;
|
|||
|
|
|||
|
namespace NewPosInstaller
|
|||
|
{
|
|||
|
public static class DirInfo
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 작업 디렉토리
|
|||
|
/// "C:\SPC_NewPosInstall\"
|
|||
|
/// </summary>
|
|||
|
public const string WorkDir = @"C:\SPC_NewPosInstall\";
|
|||
|
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 신규포스 설치 디렉토리
|
|||
|
/// Default = "C:\\SPC\POS\"
|
|||
|
/// </summary>
|
|||
|
public static string InstallDir = @"C:\SPC\POS\";
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 로그 디렉토리
|
|||
|
/// </summary>
|
|||
|
public const string LogDir = WorkDir + @"log\";
|
|||
|
/// <summary>
|
|||
|
/// 다운로드 디렉토리
|
|||
|
/// </summary>
|
|||
|
public const string DownDir = WorkDir + @"down\";
|
|||
|
/// <summary>
|
|||
|
/// 임시 디렉토리
|
|||
|
/// </summary>
|
|||
|
public const string TempDir = WorkDir + @"temp\";
|
|||
|
/// <summary>
|
|||
|
/// 백업 디렉토리
|
|||
|
/// </summary>
|
|||
|
public const string BackDir = WorkDir + @"back\";
|
|||
|
/// <summary>
|
|||
|
/// 진 데이터 백업 (일자별)
|
|||
|
/// </summary>
|
|||
|
public const string JinDirBck = BackDir + @"LocalTBL_{0}\";
|
|||
|
/// <summary>
|
|||
|
/// 진에서 내려준 데이터 폴더
|
|||
|
/// </summary>
|
|||
|
public const string JinDir = @"C:\LocalTBL\";
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public static class ServerInfo
|
|||
|
{
|
|||
|
public static string FtpName = string.Empty;
|
|||
|
public static string FtpIP = string.Empty;
|
|||
|
public static string FtpUser = string.Empty;
|
|||
|
public static string FtpPass = string.Empty;
|
|||
|
public static string FtpPath = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 다운로드받을 배포파일 (SPC.zip)
|
|||
|
/// </summary>
|
|||
|
public static string DownFile = string.Empty;
|
|||
|
|
|||
|
public static string SvrName = string.Empty;
|
|||
|
public static string SvrIP = string.Empty;
|
|||
|
public static int SvrPort = 0;
|
|||
|
|
|||
|
public new static string ToString()
|
|||
|
{
|
|||
|
return string.Format("FtpIP={0} FtpUser={1} FtpPass={2} FtpPath={3} SvrIP={4} SvrPort={5} "
|
|||
|
, FtpIP, FtpUser, FtpPass, FtpPath, SvrIP, SvrPort.ToString());
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public static class DatabaseInfo
|
|||
|
{
|
|||
|
public static string InstanceName = string.Empty;
|
|||
|
public static string DataSource = string.Empty;
|
|||
|
public static string UserId = string.Empty;
|
|||
|
public static string Password = string.Empty;
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 기본정보
|
|||
|
/// </summary>
|
|||
|
public static class BasicInfo
|
|||
|
{
|
|||
|
private const string filePath = DirInfo.WorkDir + @"Status.ini";
|
|||
|
private const string SECTION_BASIC = "BASIC";
|
|||
|
private const string SECTION_SCHEDULE = "SCHEDULE";
|
|||
|
private const string SECTION_STATUS = "STATUS";
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 설치프로그램 파일 버전 정보
|
|||
|
/// </summary>
|
|||
|
public static string InstallPgmVer { set; get; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 회사코드
|
|||
|
/// </summary>
|
|||
|
public static string CompCd
|
|||
|
{
|
|||
|
get { return _compCd; }
|
|||
|
set
|
|||
|
{
|
|||
|
_compCd = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "CompCd", _compCd);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _compCd = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 브랜드코드
|
|||
|
/// </summary>
|
|||
|
public static string BrandCd
|
|||
|
{
|
|||
|
get { return _brandCd; }
|
|||
|
set
|
|||
|
{
|
|||
|
_brandCd = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "BrandCd", _brandCd);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _brandCd = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 브랜드구분
|
|||
|
/// </summary>
|
|||
|
public static string BrandGb
|
|||
|
{
|
|||
|
get { return _brandGb; }
|
|||
|
set
|
|||
|
{
|
|||
|
_brandGb = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "BrandGb", _brandGb);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _brandGb = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 점포코드
|
|||
|
/// </summary>
|
|||
|
public static string StoreNo
|
|||
|
{
|
|||
|
get { return _storeNo; }
|
|||
|
set
|
|||
|
{
|
|||
|
_storeNo = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "StoreNo", _storeNo);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _storeNo = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// AS-IS 점포코드 (삼립 점포코드 변경 대응)
|
|||
|
/// </summary>
|
|||
|
public static string OldStoreNo
|
|||
|
{
|
|||
|
get { return _oldStoreNo; }
|
|||
|
set
|
|||
|
{
|
|||
|
_oldStoreNo = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "OldStoreNo", _oldStoreNo);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _oldStoreNo = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 점포명
|
|||
|
/// </summary>
|
|||
|
public static string StoreNm
|
|||
|
{
|
|||
|
get { return _storeNm; }
|
|||
|
set
|
|||
|
{
|
|||
|
_storeNm = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "StoreNm", _storeNm);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _storeNm = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 점포주소
|
|||
|
/// </summary>
|
|||
|
public static string StoreAddr
|
|||
|
{
|
|||
|
get { return _storeAddr; }
|
|||
|
set
|
|||
|
{
|
|||
|
_storeAddr = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "StoreAddr", _storeAddr);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _storeAddr = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 점포전화번호
|
|||
|
/// </summary>
|
|||
|
public static string StoreTel
|
|||
|
{
|
|||
|
get { return _storeTel; }
|
|||
|
set
|
|||
|
{
|
|||
|
_storeTel = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "StoreTel", _storeTel);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _storeTel = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// POS NO
|
|||
|
/// </summary>
|
|||
|
public static string PosNo
|
|||
|
{
|
|||
|
get { return _posNo; }
|
|||
|
set
|
|||
|
{
|
|||
|
_posNo = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "PosNo", _posNo);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _posNo = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 선후불 구분
|
|||
|
/// OLD[0:선불, 1:후불] => NEW[1:선불, 2:후불]
|
|||
|
/// </summary>
|
|||
|
public static string StoreType
|
|||
|
{
|
|||
|
get { return _storeType; }
|
|||
|
set
|
|||
|
{
|
|||
|
_storeType = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "StoreType", _storeType);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _storeType = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 주문구분 (후불일때만 구분함)
|
|||
|
/// OLD[0:정산,1:주문] => NEW[0:SUB, 1:MAIN]
|
|||
|
/// </summary>
|
|||
|
public static string OrderType
|
|||
|
{
|
|||
|
get { return _orderType; }
|
|||
|
set
|
|||
|
{
|
|||
|
_orderType = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "OrderType", _orderType);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _orderType = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 국가 (3자리코드)
|
|||
|
/// </summary>
|
|||
|
public static string Nation
|
|||
|
{
|
|||
|
get { return _nation; }
|
|||
|
set
|
|||
|
{
|
|||
|
_nation = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "Nation", _nation);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _nation = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 언어 (2자리코드)
|
|||
|
/// </summary>
|
|||
|
public static string Language
|
|||
|
{
|
|||
|
get { return _language; }
|
|||
|
set
|
|||
|
{
|
|||
|
_language = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "Language", _language);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _language = string.Empty;
|
|||
|
|
|||
|
public static string _font = string.Empty;
|
|||
|
public static string _fontFix = string.Empty;
|
|||
|
public static string _country = string.Empty;
|
|||
|
public static string _cultureid = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 이전회사코드
|
|||
|
/// </summary>
|
|||
|
public static string OldCompCd
|
|||
|
{
|
|||
|
get { return _oldCompCd; }
|
|||
|
set
|
|||
|
{
|
|||
|
_oldCompCd = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "OldCompCd", _oldCompCd);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _oldCompCd = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// AS-IS POS ini 파일 디렉토리
|
|||
|
/// </summary>
|
|||
|
public static string OldPosIniDir
|
|||
|
{
|
|||
|
get { return _oldPosIniDir; }
|
|||
|
set
|
|||
|
{
|
|||
|
_oldPosIniDir = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "OldPosIniDir", _oldPosIniDir);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _oldPosIniDir = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// AS-IS POS Root 디렉토리
|
|||
|
/// </summary>
|
|||
|
public static string OldPosRootDir
|
|||
|
{
|
|||
|
get { return _oldPosRootDir; }
|
|||
|
set
|
|||
|
{
|
|||
|
_oldPosRootDir = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "OldPosRootDir", _oldPosIniDir);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _oldPosRootDir = string.Empty;
|
|||
|
|
|||
|
public static string OldStoreINI { set; get; }
|
|||
|
public static string OldStoreOptINI { set; get; }
|
|||
|
public static string OldDeviceINI { set; get; }
|
|||
|
public static string OldSaleINI { set; get; }
|
|||
|
public static string OldFtpINI { set; get; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 설치일정 일자 (서버조회)
|
|||
|
/// </summary>
|
|||
|
public static string InstallDate
|
|||
|
{
|
|||
|
get { return _installDate; }
|
|||
|
set
|
|||
|
{
|
|||
|
_installDate = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_SCHEDULE, "InstallDate", _installDate);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _installDate = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 설치일정 시간 (서버조회)
|
|||
|
/// </summary>
|
|||
|
public static string InstallTime
|
|||
|
{
|
|||
|
get { return _installTime; }
|
|||
|
set
|
|||
|
{
|
|||
|
_installTime = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_SCHEDULE, "InstallTime", _installTime);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _installTime = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 오픈일자
|
|||
|
/// </summary>
|
|||
|
public static string SysOpenDate
|
|||
|
{
|
|||
|
get { return IniFile.GetValue(filePath, SECTION_SCHEDULE, "SysOpenDate", ""); }
|
|||
|
set { IniFile.SetValue(filePath, SECTION_SCHEDULE, "SysOpenDate", value); }
|
|||
|
}
|
|||
|
private static string _openDate = string.Empty;
|
|||
|
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 프로그램 다운로드 일시
|
|||
|
/// </summary>
|
|||
|
public static string PGMDownDate
|
|||
|
{
|
|||
|
get { return _pgmDownDate; }
|
|||
|
set
|
|||
|
{
|
|||
|
_pgmDownDate = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_STATUS, "PGMDownDate", _pgmDownDate);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _pgmDownDate = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 프로그램 설치 일시
|
|||
|
/// </summary>
|
|||
|
public static string POSSetupDate
|
|||
|
{
|
|||
|
get { return _posSetupDate; }
|
|||
|
set
|
|||
|
{
|
|||
|
_posSetupDate = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_STATUS, "POSSetupDate", _posSetupDate);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _posSetupDate = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 데이터베이스 설치 일시
|
|||
|
/// </summary>
|
|||
|
public static string DBCreateDate
|
|||
|
{
|
|||
|
get { return _dbCreateData; }
|
|||
|
set
|
|||
|
{
|
|||
|
_dbCreateData = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_STATUS, "DBCreateDate", _dbCreateData);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _dbCreateData = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 구POS 운영정보 이행 처리 일자
|
|||
|
/// </summary>
|
|||
|
public static string OldPosTransDate
|
|||
|
{
|
|||
|
get { return _oldPosTransDate; }
|
|||
|
set
|
|||
|
{
|
|||
|
_oldPosTransDate = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_STATUS, "OldPosTransDate", _oldPosTransDate);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _oldPosTransDate = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 신POS 마스터 다운로드 일시
|
|||
|
/// (마스터 다운로드는 하지 않는다. 너무 힘들다)
|
|||
|
/// </summary>
|
|||
|
public static string MSTDownDate
|
|||
|
{
|
|||
|
get { return _mstDownDate; }
|
|||
|
set
|
|||
|
{
|
|||
|
//_mstDownDate = value;
|
|||
|
//IniFile.SetValue(filePath, SECTION_STATUS, "MSTDownDate", _mstDownDate);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _mstDownDate = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 신POS 최초 운영이미지 다운로드 일시
|
|||
|
/// </summary>
|
|||
|
public static string IMGDownDate
|
|||
|
{
|
|||
|
get { return _imgDownDate; }
|
|||
|
set
|
|||
|
{
|
|||
|
_imgDownDate = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_STATUS, "IMGDownDate", _imgDownDate);
|
|||
|
}
|
|||
|
}
|
|||
|
public static string _imgDownDate = string.Empty;
|
|||
|
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// CompCode={0} BrandCode={1} StoreNo={2} StoreName={3} PosNo={4} Nation={5} Language={6}
|
|||
|
/// </summary>
|
|||
|
/// <returns></returns>
|
|||
|
public new static string ToString()
|
|||
|
{
|
|||
|
return string.Format("CompCode={0} BrandCode={1} StoreNo={2} StoreName={3} PosNo={4} Nation={5} Language={6} OldIniDir={7} InstallDate={8} InstallTime={9}"
|
|||
|
, _compCd, _brandCd, _storeNo, _storeNm, _posNo, _nation, _language, _oldPosIniDir, _installDate, _installTime);
|
|||
|
}
|
|||
|
|
|||
|
public static void ReadStatusInfo()
|
|||
|
{
|
|||
|
if (File.Exists(filePath))
|
|||
|
{
|
|||
|
string createDate = IniFile.GetValue(filePath, SECTION_BASIC, "CreateDate", "");
|
|||
|
if (string.IsNullOrWhiteSpace(createDate))
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "CreateDate", DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"));
|
|||
|
|
|||
|
_compCd = IniFile.GetValue(filePath, SECTION_BASIC, "CompCd", "");
|
|||
|
_brandCd = IniFile.GetValue(filePath, SECTION_BASIC, "BrandCd", "");
|
|||
|
_brandGb = IniFile.GetValue(filePath, SECTION_BASIC, "BrandGb", "");
|
|||
|
_storeNo = IniFile.GetValue(filePath, SECTION_BASIC, "StoreNo", "");
|
|||
|
_storeNm = IniFile.GetValue(filePath, SECTION_BASIC, "StoreNm", "");
|
|||
|
_posNo = IniFile.GetValue(filePath, SECTION_BASIC, "PosNo", "");
|
|||
|
_storeType = IniFile.GetValue(filePath, SECTION_BASIC, "StoreType");
|
|||
|
_orderType = IniFile.GetValue(filePath, SECTION_BASIC, "OrderType");
|
|||
|
_nation = IniFile.GetValue(filePath, SECTION_BASIC, "Nation", "");
|
|||
|
_language = IniFile.GetValue(filePath, SECTION_BASIC, "Language", "");
|
|||
|
_oldCompCd = IniFile.GetValue(filePath, SECTION_BASIC, "OldCompCd", "");
|
|||
|
_oldPosIniDir = IniFile.GetValue(filePath, SECTION_BASIC, "OldPosIniDir", "");
|
|||
|
_oldStoreNo = IniFile.GetValue(filePath, SECTION_BASIC, "OldStoreNo", "");
|
|||
|
|
|||
|
_installDate = IniFile.GetValue(filePath, SECTION_SCHEDULE, "InstallDate", "");
|
|||
|
_installTime = IniFile.GetValue(filePath, SECTION_SCHEDULE, "InstallTime", "");
|
|||
|
_openDate = IniFile.GetValue(filePath, SECTION_SCHEDULE, "OpenDate", "");
|
|||
|
|
|||
|
_pgmDownDate = IniFile.GetValue(filePath, SECTION_STATUS, "PGMDownDate", "");
|
|||
|
_posSetupDate = IniFile.GetValue(filePath, SECTION_STATUS, "POSSetupDate", "");
|
|||
|
_dbCreateData = IniFile.GetValue(filePath, SECTION_STATUS, "DBCreateDate", "");
|
|||
|
_oldPosTransDate = IniFile.GetValue(filePath, SECTION_STATUS, "OldPosTransDate", "");
|
|||
|
_mstDownDate = IniFile.GetValue(filePath, SECTION_STATUS, "MSTDownDate", "");
|
|||
|
_imgDownDate = IniFile.GetValue(filePath, SECTION_STATUS, "IMGDownDate", "");
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
// 신규생성
|
|||
|
IniFile.SetValue(filePath, SECTION_BASIC, "CreateDate", DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"));
|
|||
|
CompCd = string.Empty;
|
|||
|
BrandCd = string.Empty;
|
|||
|
BrandGb = string.Empty;
|
|||
|
StoreNo = string.Empty;
|
|||
|
StoreNm = string.Empty;
|
|||
|
PosNo = string.Empty;
|
|||
|
StoreType = string.Empty;
|
|||
|
OrderType = string.Empty;
|
|||
|
Nation = string.Empty;
|
|||
|
Language = string.Empty;
|
|||
|
OldCompCd = string.Empty;
|
|||
|
OldPosIniDir = string.Empty;
|
|||
|
OldStoreNo = string.Empty;
|
|||
|
|
|||
|
InstallDate = string.Empty;
|
|||
|
InstallTime = string.Empty;
|
|||
|
SysOpenDate = string.Empty;
|
|||
|
|
|||
|
PGMDownDate = string.Empty;
|
|||
|
POSSetupDate = string.Empty;
|
|||
|
DBCreateDate = string.Empty;
|
|||
|
OldPosTransDate = string.Empty;
|
|||
|
MSTDownDate = string.Empty;
|
|||
|
IMGDownDate = string.Empty;
|
|||
|
|
|||
|
// 주방프린터
|
|||
|
for (var i = 1; i <= 15; i++)
|
|||
|
{
|
|||
|
string key = string.Format("KPS{0:00}", i);
|
|||
|
string value= string.Empty;
|
|||
|
SetKPSInfo(key, value);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 주방장치정보 읽기
|
|||
|
/// </summary>
|
|||
|
/// <param name="key"></param>
|
|||
|
public static string GetKPSInfo(string key)
|
|||
|
{
|
|||
|
return IniFile.GetValue(filePath, "KPSDEVICE", key, "");
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 주방장치정보 저장
|
|||
|
/// </summary>
|
|||
|
/// <param name="key"></param>
|
|||
|
/// <param name="value"></param>
|
|||
|
public static bool SetKPSInfo(string key, string value)
|
|||
|
{
|
|||
|
return IniFile.SetValue(filePath, "KPSDEVICE", key, value);
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 포스옵션 읽기
|
|||
|
/// </summary>
|
|||
|
/// <param name="key"></param>
|
|||
|
/// <returns></returns>
|
|||
|
public static string GetPosOptionInfo(string key)
|
|||
|
{
|
|||
|
return IniFile.GetValue(filePath, "OPTION", key, "");
|
|||
|
}
|
|||
|
/// <summary>
|
|||
|
/// 포스옵션 저장
|
|||
|
/// </summary>
|
|||
|
/// <param name="key"></param>
|
|||
|
/// <param name="value"></param>
|
|||
|
/// <returns></returns>
|
|||
|
public static bool SetPosOptionInfo(string key, string value)
|
|||
|
{
|
|||
|
return IniFile.SetValue(filePath, "OPTION", key, value);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public static class CheckInfo
|
|||
|
{
|
|||
|
private const string filePath = DirInfo.WorkDir + @"Status.ini";
|
|||
|
private const string SECTION_CHECK = "CHECK";
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 현재화면 해상도
|
|||
|
/// 800x600, 1024x768
|
|||
|
/// </summary>
|
|||
|
public static string ScreenSize
|
|||
|
{
|
|||
|
get { return _screenSize; }
|
|||
|
set
|
|||
|
{
|
|||
|
_screenSize = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_CHECK, "ScreenSize", _screenSize);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _screenSize = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 카드리더기 사용구분
|
|||
|
/// MSR(USB:KeybordWedge), MSR(Serial:Emulator), IC
|
|||
|
/// </summary>
|
|||
|
public static string CardReader
|
|||
|
{
|
|||
|
get { return _cardReader; }
|
|||
|
set
|
|||
|
{
|
|||
|
_cardReader = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_CHECK, "CardReader", _cardReader);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _cardReader = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// CAT단말기 사용구분
|
|||
|
/// NONE:미사용, OLD:구형, NEW:구형
|
|||
|
/// </summary>
|
|||
|
public static string CatTerminal
|
|||
|
{
|
|||
|
get { return _catTerminal; }
|
|||
|
set
|
|||
|
{
|
|||
|
_catTerminal = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_CHECK, "CatTerminal", _catTerminal);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _catTerminal = string.Empty;
|
|||
|
|
|||
|
public static string OldStoreNo
|
|||
|
{
|
|||
|
get { return _oldStoreNo; }
|
|||
|
set
|
|||
|
{
|
|||
|
_oldStoreNo = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_CHECK, "OldStoreNo", _oldStoreNo);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _oldStoreNo = string.Empty;
|
|||
|
|
|||
|
public static string TPayUsed
|
|||
|
{
|
|||
|
get { return _tpayUsed; }
|
|||
|
set
|
|||
|
{
|
|||
|
_tpayUsed = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_CHECK, "TPayUsed", _tpayUsed);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _tpayUsed = string.Empty;
|
|||
|
|
|||
|
public static string TPayBleUsed
|
|||
|
{
|
|||
|
get { return _tpayBleUsed; }
|
|||
|
set
|
|||
|
{
|
|||
|
_tpayBleUsed = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_CHECK, "TPayBleUsed", _tpayBleUsed);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _tpayBleUsed = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 포스정보
|
|||
|
/// Format => POSIP|POS구분|메인여부|화면크기|카드리더기종류|CAT단말기종류
|
|||
|
/// </summary>
|
|||
|
public static string PosInfo
|
|||
|
{
|
|||
|
get { return _posInfo; }
|
|||
|
set
|
|||
|
{
|
|||
|
_posInfo = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_CHECK, "PosInfo", _tpayBleUsed);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _posInfo = string.Empty;
|
|||
|
|
|||
|
public static string OSVerInfo
|
|||
|
{
|
|||
|
get { return _osVerInfo.Trim(); }
|
|||
|
set
|
|||
|
{
|
|||
|
_osVerInfo = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_CHECK, "OSVerInfo", _osVerInfo);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _osVerInfo = string.Empty;
|
|||
|
|
|||
|
public static string Permission
|
|||
|
{
|
|||
|
get { return _permission.Trim(); }
|
|||
|
set
|
|||
|
{
|
|||
|
_permission = value;
|
|||
|
IniFile.SetValue(filePath, SECTION_CHECK, "Permission", _permission);
|
|||
|
}
|
|||
|
}
|
|||
|
private static string _permission = string.Empty;
|
|||
|
|
|||
|
public static void ReadCheckInfo()
|
|||
|
{
|
|||
|
_oldStoreNo = IniFile.GetValue(filePath, SECTION_CHECK, "OldStoreNo");
|
|||
|
|
|||
|
_screenSize = IniFile.GetValue(filePath, SECTION_CHECK, "ScreenSize");
|
|||
|
_cardReader = IniFile.GetValue(filePath, SECTION_CHECK, "CardReader");
|
|||
|
_catTerminal = IniFile.GetValue(filePath, SECTION_CHECK, "CatTerminal");
|
|||
|
_tpayUsed = IniFile.GetValue(filePath, SECTION_CHECK, "TPayUsed");
|
|||
|
_tpayBleUsed = IniFile.GetValue(filePath, SECTION_CHECK, "TPayBleUsed");
|
|||
|
|
|||
|
_posInfo = IniFile.GetValue(filePath, SECTION_CHECK, "PosInfo");
|
|||
|
_osVerInfo = IniFile.GetValue(filePath, SECTION_CHECK, "OSVerInfo");
|
|||
|
_permission = IniFile.GetValue(filePath, SECTION_CHECK, "Permission");
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 이행 전 테이블 정보
|
|||
|
/// </summary>
|
|||
|
public class TableInfo
|
|||
|
{
|
|||
|
public string BrandCode = string.Empty;
|
|||
|
public string StroeCode = string.Empty;
|
|||
|
public string PosNo = string.Empty;
|
|||
|
public string FloorCode = string.Empty;
|
|||
|
public string FloorName = string.Empty;
|
|||
|
public string TableNo = string.Empty;
|
|||
|
public string TableName = string.Empty;
|
|||
|
public int X = 0;
|
|||
|
public int Y = 0;
|
|||
|
public int W = 0;
|
|||
|
public int H = 0;
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 층 정보
|
|||
|
/// </summary>
|
|||
|
public class MST_FLOOR
|
|||
|
{
|
|||
|
public class DATA
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 층코드
|
|||
|
/// </summary>
|
|||
|
public string FLOOR_CD = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 층명
|
|||
|
/// </summary>
|
|||
|
public string FLOOR_NM = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 수정일시
|
|||
|
/// </summary>
|
|||
|
public string UPD_DT = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 등록일시
|
|||
|
/// </summary>
|
|||
|
public string REG_DT = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 상태
|
|||
|
/// </summary>
|
|||
|
public PosConst.DB_ROW_STATUS STATUS = PosConst.DB_ROW_STATUS.NONE;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 테이블 정보
|
|||
|
/// </summary>
|
|||
|
public class MST_TABLE
|
|||
|
{
|
|||
|
public class DATA
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// 층 코드
|
|||
|
/// </summary>
|
|||
|
public string FLOOR_CD = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 테이블 번호
|
|||
|
/// </summary>
|
|||
|
public string TABLE_NO = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 테이블 명
|
|||
|
/// </summary>
|
|||
|
public string TABLE_NM = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 테이블 유형(1:테이블, 2:레이블)
|
|||
|
/// </summary>
|
|||
|
public string TABLE_TYPE = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 테이블 형태(1:사각, 2:라운드, 3:타원, 4:이미지)
|
|||
|
/// </summary>
|
|||
|
public string TABLE_TYPE__1640 = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 배경색
|
|||
|
/// </summary>
|
|||
|
public string BACK_COLOR = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 배경이미지
|
|||
|
/// </summary>
|
|||
|
public string BACK_IMAGE = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 폰트 색상
|
|||
|
/// </summary>
|
|||
|
public string FONT_COLOR = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 폰트 명
|
|||
|
/// </summary>
|
|||
|
public string FONT_NM = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 폰트 크기
|
|||
|
/// </summary>
|
|||
|
public int FONT_SIZE = 0;
|
|||
|
/// <summary>
|
|||
|
/// X 좌표
|
|||
|
/// </summary>
|
|||
|
public int X_COORD = 0;
|
|||
|
/// <summary>
|
|||
|
/// Y 좌표
|
|||
|
/// </summary>
|
|||
|
public int Y_COORD = 0;
|
|||
|
/// <summary>
|
|||
|
/// 넓이
|
|||
|
/// </summary>
|
|||
|
public int WIDTH = 0;
|
|||
|
/// <summary>
|
|||
|
/// 높이
|
|||
|
/// </summary>
|
|||
|
public int HEIGHT = 0;
|
|||
|
/// <summary>
|
|||
|
/// 테이블 표시 구분
|
|||
|
/// </summary>
|
|||
|
public string TABLE_DISP_FLAG = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 좌석 수
|
|||
|
/// </summary>
|
|||
|
public int SEAT_CNT = 0;
|
|||
|
/// <summary>
|
|||
|
/// 좌석 수 표시 구분
|
|||
|
/// </summary>
|
|||
|
public string SEAT_DISP_FLAG = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 테이블 조작 구분
|
|||
|
/// </summary>
|
|||
|
public string OP_FLAG = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 조작 층 구분
|
|||
|
/// </summary>
|
|||
|
public string OP_FLOOR_CD = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 조작 테이블 번호
|
|||
|
/// </summary>
|
|||
|
public string OP_TABLE_NO = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 테이블 사용 구분
|
|||
|
/// </summary>
|
|||
|
public string USE_FLAG = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 고객수
|
|||
|
/// </summary>
|
|||
|
public int CUST_CNT = 0;
|
|||
|
/// <summary>
|
|||
|
/// 최초 주문 시간
|
|||
|
/// </summary>
|
|||
|
public string FIRST_ORDER_TIME = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 주문금액
|
|||
|
/// </summary>
|
|||
|
public double ORDER_AMT = 0;
|
|||
|
/// <summary>
|
|||
|
/// 예약 구분
|
|||
|
/// </summary>
|
|||
|
public string RESERVATION_FLAG = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 예약 시간
|
|||
|
/// </summary>
|
|||
|
public string RESERVATION_TIME = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 주문 칼라
|
|||
|
/// </summary>
|
|||
|
public string ORDER_COLOR = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 결제완료 칼라
|
|||
|
/// </summary>
|
|||
|
public string PAY_COMPLETE_COLOR = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 결제완료 구분
|
|||
|
/// </summary>
|
|||
|
public string PAY_COMPLETE_FLAG = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 수정일시
|
|||
|
/// </summary>
|
|||
|
public string UPD_DT = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 등록일시
|
|||
|
/// </summary>
|
|||
|
public string REG_DT = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 상태 (추가,수정,삭제)
|
|||
|
/// </summary>
|
|||
|
public PosConst.DB_ROW_STATUS STATUS = PosConst.DB_ROW_STATUS.NONE;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 테이블 출력용 상품목록
|
|||
|
/// </summary>
|
|||
|
public string ITEM_LIST = string.Empty;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 객층정보 (FILLER1 = m_cTrnStatus.Head.PayGndrDiv + "|" + m_cTrnStatus.Head.PayAge)
|
|||
|
/// </summary>
|
|||
|
public string CUST_AGE = string.Empty;
|
|||
|
/// <summary>
|
|||
|
/// 고객상세정보 (FILLER2)
|
|||
|
/// </summary>
|
|||
|
public string CUST_LST = string.Empty;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 기타코드 (사유코드)
|
|||
|
/// </summary>
|
|||
|
public class EtcCodeInfo
|
|||
|
{
|
|||
|
public string GroupCode = string.Empty;
|
|||
|
public string commCode = string.Empty;
|
|||
|
public string EtcCode = string.Empty;
|
|||
|
public string EtcName = string.Empty;
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 테이블예약 정보
|
|||
|
/// </summary>
|
|||
|
public class TableReserv
|
|||
|
{
|
|||
|
public string ReservNo = string.Empty;
|
|||
|
public string ReservDt = string.Empty;
|
|||
|
public string ReservTm = string.Empty;
|
|||
|
public string Cashier = string.Empty;
|
|||
|
public string TelNo = string.Empty;
|
|||
|
public string Note = string.Empty;
|
|||
|
public string AlarmYn = string.Empty;
|
|||
|
public string AlarmTm = string.Empty;
|
|||
|
public string Comfirm = string.Empty;
|
|||
|
|
|||
|
public string UpdID = string.Empty;
|
|||
|
public string UpdDt = string.Empty;
|
|||
|
public string InsID = string.Empty;
|
|||
|
public string InsDt = string.Empty;
|
|||
|
}
|
|||
|
}
|