Example #1
0
 public static void InitDispatchFileName()
 {
     foreach (var dispFile in _dispatchFileInfoDictionary)
     {
         DispatchFileInfo dispFileInfo = dispFile.Value;
         dispFileInfo.SourceFileName  = "";
         dispFileInfo.ConvertFileName = "";
         dispFileInfo.FileConverted   = false;
     }
 }
Example #2
0
        public static void SetDispatchFileName(string seatCode, string dispType, string srcFileName, string destFileName)
        {
            DispatchFileInfo dispFileInfo = GetDispatchFileInfo(seatCode, dispType);

            if (dispFileInfo != null)
            {
                dispFileInfo.SourceFileName  = srcFileName;
                dispFileInfo.ConvertFileName = destFileName;
                dispFileInfo.FileConverted   = true;
            }
        }
Example #3
0
        public static bool CheckDispatchFileConverted(string seatCode)
        {
            foreach (var dispFile in _dispatchFileInfoDictionary)
            {
                DispatchFileInfo dispFileInfo = dispFile.Value;
                if (dispFileInfo.SeatCode == seatCode && dispFileInfo.FileConverted == false)
                {
                    return(false);
                }
            }

            return(true);
        }
Example #4
0
        public static void AddDispatchFileInfo(DispatchFileInfo dispFileInfo)
        {
            if (string.IsNullOrWhiteSpace(dispFileInfo.SeatCode) || string.IsNullOrWhiteSpace(dispFileInfo.DispatchFileType))
            {
                return;
            }

            if (_dispatchFileInfoDictionary.ContainsKey(DispFileInfoKey(dispFileInfo.SeatCode, dispFileInfo.DispatchFileType)))
            {
                //throw new Exception(string.Format("唯一索引 {0} 已存在", dispFileKey.DispatchFileType));
                return;
            }
            _dispatchFileInfoDictionary.Add(DispFileInfoKey(dispFileInfo.SeatCode, dispFileInfo.DispatchFileType), dispFileInfo);
        }
Example #5
0
        public static List <DispatchFileInfo> GetDispatchFileInfoList(string seatCode)
        {
            List <DispatchFileInfo> dispFileInfoList = new List <DispatchFileInfo>();

            foreach (var dispFile in _dispatchFileInfoDictionary)
            {
                DispatchFileInfo dispFileInfo = dispFile.Value;
                if (dispFileInfo.SeatCode == seatCode)
                {
                    dispFileInfoList.Add(dispFileInfo);
                }
            }

            return(dispFileInfoList);
        }