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(ConnectionStatus objectValue)
 {
     if (DicConnectionStatus.ContainsKey(objectValue.Id))
     {
         DicConnectionStatus.Remove(objectValue.Id);
     }
 }
 public static bool IsExistConnectionStatus(int id)
 {
     if (DicConnectionStatus.ContainsKey(id))
     {
         return(true);
     }
     return(false);
 }
 public static ConnectionStatus GetConnectionStatus(int id)
 {
     if (DicConnectionStatus.ContainsKey(id))
     {
         return(DicConnectionStatus[id].Clone() as ConnectionStatus);
     }
     LogTo.Error("Not get ConnectionStatus by id = " + id);
     return(null);
 }
 public static List <ConnectionStatus> GetAllConnectionStatus()
 {
     return(DicConnectionStatus.Select(obj => obj.Value.Clone() as ConnectionStatus).ToList());
 }