public static void ClearAllDic() { try { DicArea.Clear(); DicConnection.Clear(); DicConnectionStatus.Clear(); DicConnectionType.Clear(); DicContract.Clear(); DicContractStatus.Clear(); DicCustomer.Clear(); DicCustomerFeedback.Clear(); DicDetailImportReceipt.Clear(); DicDevice.Clear(); DicDeviceType.Clear(); DicEmployee.Clear(); DicFee.Clear(); DicImage.Clear(); DicImportReceipt.Clear(); DicManufacturer.Clear(); DicPayment.Clear(); DicPaymentFee.Clear(); DicProvider.Clear(); DicServiceForm.Clear(); DicServiceFormStatus.Clear(); DicServicePack.Clear(); DicServicePackFee.Clear(); DicStore.Clear(); } catch (Exception ex) { LogTo.Error(ex.ToString()); } }
public static void SortAllDic() { try { DicArea = DicArea.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicConnection = DicConnection.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicConnectionStatus = DicConnectionStatus.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicConnectionType = DicConnectionType.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicContract = DicContract.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicContractStatus = DicContractStatus.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicCustomer = DicCustomer.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicCustomerFeedback = DicCustomerFeedback.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicDevice = DicDevice.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicDeviceType = DicDeviceType.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicEmployee = DicEmployee.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicFee = DicFee.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicImage = DicImage.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicImportReceipt = DicImportReceipt.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicManufacturer = DicManufacturer.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicPayment = DicPayment.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicProvider = DicProvider.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicServiceForm = DicServiceForm.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicServiceFormStatus = DicServiceFormStatus.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicServicePack = DicServicePack.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); DicStore = DicStore.OrderBy(x => x.Key).ToDictionary(x => x.Key, y => y.Value); } catch (Exception ex) { LogTo.Error(ex.ToString()); } }
internal static void RemoveMemory(Provider objectValue) { if (DicProvider.ContainsKey(objectValue.Id)) { DicProvider.Remove(objectValue.Id); } }
public static bool IsExistProvider(int id) { if (DicProvider.ContainsKey(id)) { return(true); } return(false); }
public static Provider GetProvider(int id) { if (DicProvider.ContainsKey(id)) { return(DicProvider[id].Clone() as Provider); } LogTo.Error("Not get Provider by id = " + id); return(null); }
/// <summary> /// 结束分词,添加最大词进入句子的单词序列 /// </summary> private void endFlex() { /*********************** * 识别出单词 * ***********************/ if (_max_node != null) { _susentence.Words.Add(_max_node.Content.Copy()); } /************************** * 未识别出单词 * ********************************/ else { /********************************* * 单字词词典包含信息 * *********************************************/ if (DicProvider.SingleDic.ContainsKey(_context[_currentPos - _serachTime + 1])) { _susentence.Words.Add(DicProvider.GetWordInfoFromSingleDic(_context[_currentPos - _serachTime + 1]).Copy()); } /*************************** * 单字词词典未包含信息 * ****************************/ else { _susentence.Words.Add(new _WordInnfo(_context[_currentPos - _serachTime + 1].ToString(), WordType.Unknow)); } } /******************** * 返回位置 * **********************************/ if (_maxTime == 0) { previous(_serachTime - 1); } else { previous(_serachTime - _maxTime); } /******************** * 重置参数 * ******************/ _maxTime = _serachTime = 0; _max_node = null; _isSearchFromTree = true; }
public static List <Provider> GetAllProvider() { return(DicProvider.Select(obj => obj.Value.Clone() as Provider).ToList()); }