public TirePatternConfig GetConfigByPKID(int pkid)
 {
     if (pkid == 0)
     {
         return(null);
     }
     try
     {
         var result = handler.GetConfigByPKID(pkid);
         if (result == null || !result.Any() || result.Count == 0)
         {
             return(null);
         }
         else
         {
             return(result.FirstOrDefault());
         }
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "GetConfigByPKID", ex);
         Logger.Log(Level.Error, exception, "GetConfigByPKID");
         throw ex;
     }
 }
        public bool DeleteShareConfigByLocation(string location, string specialParam, int jumpId)
        {
            using (var dbHelper = new SqlDbHelper(ConnectionHelper.GetDecryptConn("Gungnir")))
            {
                try
                {
                    dbHelper.BeginTransaction();
                    if (!handler.DeleteShareConfigByLocation(location, specialParam))
                    {
                        dbHelper.Rollback();
                        return(false);
                    }

                    if (!handler.DeleteShareSConfigByJumpId(jumpId))
                    {
                        dbHelper.Rollback();
                        return(false);
                    }
                    dbHelper.Commit();
                    return(true);
                }
                catch (TuhuBizException)
                {
                    throw;
                }
                catch (Exception ex)
                {
                    var exception = new DownloadAppException(1, "DeleteShareConfigByLocation", ex);
                    Logger.Log(Level.Error, exception, "DeleteShareConfigByLocation");
                    throw ex;
                }
            }
        }
        public async Task <IEnumerable <WxConfig> > SelectWxConfigsAsync()
        {
            try
            {
                using (var client = new Tuhu.Service.Push.WeiXinPushClient())
                {
                    var result = await client.SelectWxConfigsAsync();

                    if (result.Success)
                    {
                        return(result.Result?.Where(_ => _.platform > 1).ToList() ?? new List <WxConfig>());
                    }
                    else
                    {
                        return(new List <WxConfig>());
                    }
                }
            }
            catch (Exception ex)
            {
                var exception = new DownloadAppException(1, "SelectWxConfigsAsync", ex);
                Logger.Log(Level.Error, exception, "SelectWxConfigsAsync");
                return(new List <WxConfig>());
            }
        }
 public TirePatternConfig GetConfigByPattern(string pattern)
 {
     if (string.IsNullOrWhiteSpace(pattern))
     {
         return(null);
     }
     try
     {
         var result = handler.GetConfigByPattern(pattern);
         if (result == null || !result.Any() || result.Count == 0)
         {
             return(null);
         }
         else
         {
             return(result.FirstOrDefault());
         }
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "GetConfigByPattern", ex);
         Logger.Log(Level.Error, exception, "GetConfigByPattern");
         throw ex;
     }
 }
 public bool InsertWheelAdapterConfigLog(WheelAdapterConfigLog wacl)
 {
     try
     {
         return(handler.InsertWheelAdapterConfigLog(wacl));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "InsertWheelAdapterConfigLog", ex);
         Logger.Log(Level.Error, exception, "InsertWheelAdapterConfigLog");
         throw ex;
     }
 }
 public bool UpdateWheelAdapterConfigWithTid(WheelAdapterConfigWithTid wac)
 {
     try
     {
         return(handler.UpdateWheelAdapterConfigWithTid(wac));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "UpdateWheelAdapterConfigWithTid", ex);
         Logger.Log(Level.Error, exception, "UpdateWheelAdapterConfigWithTid");
         throw ex;
     }
 }
Exemple #7
0
 public bool UpdateTireSpecParamsConfig(TireSpecParamsConfig config)
 {
     try
     {
         return(handler.UpdateTireSpecParamsConfig(config));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "UpdateTireSpecParamsConfig", ex);
         Logger.Log(Level.Error, exception, "UpdateTireSpecParamsConfig");
         throw ex;
     }
 }
Exemple #8
0
 public bool DeleleBarCodeByBatchNum(string batchNum)
 {
     try
     {
         return(handler.DeleleBarCodeByBatchNum(batchNum));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "DeleleBarCodeByBatchNum", ex);
         Logger.Log(Level.Error, exception, "DeleleBarCodeByBatchNum");
         throw ex;
     }
 }
Exemple #9
0
 public int InsertBarCodeConfig(List <InputBarCode> list)
 {
     try
     {
         return(handler.InsertBarCodeConfig(list));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "InsertBarCodeConfig", ex);
         Logger.Log(Level.Error, exception, "InsertBarCodeConfig");
         throw ex;
     }
 }
 public List <Str> SelectVehiclesAndId(string brand)
 {
     try
     {
         return(handlerReadOnly.SelectVehiclesAndId(brand));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "SelectVehiclesAndId", ex);
         Logger.Log(Level.Error, exception, "SelectVehiclesAndId");
         throw ex;
     }
 }
 public List <TirePatternChangeLog> SelectTireSpecParamsEditLog(string pid)
 {
     try
     {
         return(handlerReadOnly.SelectTirePatternChangeLog(pid));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "SelectTirePatternChangeLog", ex);
         Logger.Log(Level.Error, exception, "SelectTirePatternChangeLog");
         throw ex;
     }
 }
 public List <string> GetAffectedPids(string pattern)
 {
     try
     {
         return(handler.GetAffectedPids(pattern));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "GetAffectedPids", ex);
         Logger.Log(Level.Error, exception, "GetAffectedPids");
         throw ex;
     }
 }
 public bool UpdateTirePatternConfig(TirePatternConfig oldConfig, TirePatternConfig newConfig)
 {
     try
     {
         return(handler.UpdateTirePatternConfig(oldConfig, newConfig));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "UpdateTirePatternConfig", ex);
         Logger.Log(Level.Error, exception, "UpdateTirePatternConfig");
         throw ex;
     }
 }
 public bool InsertTirePatternConfig(TirePatternConfig config)
 {
     try
     {
         return(handler.InsertTirePatternConfig(config));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "InsertTirePatternConfig", ex);
         Logger.Log(Level.Error, exception, "InsertTirePatternConfig");
         throw ex;
     }
 }
Exemple #15
0
 public TireSpecParamsModel SelectTireSpecParamsModelByPid(string pid)
 {
     try
     {
         return(handlerReadOnly.SelectTireSpecParamsModelByPid(pid));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "SelectTireSpecParamsModelByPid", ex);
         Logger.Log(Level.Error, exception, "SelectTireSpecParamsModelByPid");
         throw ex;
     }
 }
Exemple #16
0
 public List <TireSpecParamsModel> QueryTireSpecParamsModel(TireSpecParamsConfigQuery query)
 {
     try
     {
         return(handlerReadOnly.QueryTireSpecParamsModel(query));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "QueryTireSpecParamsModel", ex);
         Logger.Log(Level.Error, exception, "QueryTireSpecParamsModel");
         throw ex;
     }
 }
Exemple #17
0
 public bool CheckPidExist(string pid)
 {
     try
     {
         return(handlerReadOnly.CheckPidExist(pid));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "CheckPidExist", ex);
         Logger.Log(Level.Error, exception, "CheckPidExist");
         throw ex;
     }
 }
 public List <WheelAdapterConfigLog> SelectWheelAdapterConfigLog(string tid)
 {
     try
     {
         return(handlerReadOnly.SelectWheelAdapterConfigLog(tid));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "SelectWheelAdapterConfigLog", ex);
         Logger.Log(Level.Error, exception, "SelectWheelAdapterConfigLog");
         throw ex;
     }
 }
 public List <Str> SelectBrands()
 {
     try
     {
         return(handlerReadOnly.SelectBrands());
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "SelectBrands", ex);
         Logger.Log(Level.Error, exception, "SelectBrands");
         throw ex;
     }
 }
 public List <TirePatternConfig> QueryTirePatternConfig(TirePatternConfigQuery query)
 {
     try
     {
         return(handlerReadOnly.QueryTirePatternConfig(query));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "QueryTirePatternConfig", ex);
         Logger.Log(Level.Error, exception, "QueryTirePatternConfig");
         throw ex;
     }
 }
 public List <Str> SelectYear(string vehicleid, string pailiang)
 {
     try
     {
         return(handlerReadOnly.SelectYear(vehicleid, pailiang));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "SelectYear", ex);
         Logger.Log(Level.Error, exception, "SelectYear");
         throw ex;
     }
 }
Exemple #22
0
 public bool InsertUploadBarCodeLog(UploadBarCodeLog log)
 {
     try
     {
         return(handler.InsertUploadBarCodeLog(log));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "InsertUploadBarCodeLog", ex);
         Logger.Log(Level.Error, exception, "InsertUploadBarCodeLog");
         throw ex;
     }
 }
Exemple #23
0
 public List <InputBarCode> QueryInputBarCodeByError(string error, List <InputBarCode> list)
 {
     try
     {
         return(handler.QueryInputBarCodeByError(error, list));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "QueryInputBarCodeByError", ex);
         Logger.Log(Level.Error, exception, "QueryInputBarCodeByError");
         throw ex;
     }
 }
Exemple #24
0
 public List <UploadBarCodeLog> QueryUploadBarCodeLogModel(LogSearchQuery query)
 {
     try
     {
         return(handler.QueryUploadBarCodeLogModel(query));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "QueryUploadBarCodeLogModel", ex);
         Logger.Log(Level.Error, exception, "QueryUploadBarCodeLogModel");
         throw ex;
     }
 }
Exemple #25
0
 public List <TireSecurityCodeConfig> QuerySecurityCodeConfigModelByBatchNum(string batchNum)
 {
     try
     {
         return(handler.QuerySecurityCodeConfigModelByBatchNum(batchNum));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "QuerySecurityCodeConfigModelByBatchNum", ex);
         Logger.Log(Level.Error, exception, "QuerySecurityCodeConfigModelByBatchNum");
         throw ex;
     }
 }
 public List <ShareSupervisionConfig> SelectShareSConfigByJumpId(int jumpId)
 {
     try
     {
         return(handler.SelectShareSConfigByJumpId(jumpId));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "SelectShareSConfigByLocation", ex);
         Logger.Log(Level.Error, exception, "SelectShareSConfigByLocation");
         throw ex;
     }
 }
Exemple #27
0
 public List <TireSecurityCodeConfig> QuerySecurityCodeConfigModel(TireSecurityCodeConfigQuery query)
 {
     try
     {
         return(handler.QuerySecurityCodeConfigModel(query));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "QuerySecurityCodeConfigModel", ex);
         Logger.Log(Level.Error, exception, "QuerySecurityCodeConfigModel");
         throw ex;
     }
 }
 public List <VehicleTypeInfo> QueryVehicleTypeInfoByTID(WheelAdapterConfigQuery query)
 {
     try
     {
         return(handlerReadOnly.QueryVehicleTypeInfoByTID(query));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "QueryVehicleTypeInfoByTID", ex);
         Logger.Log(Level.Error, exception, "QueryVehicleTypeInfoByTID");
         throw ex;
     }
 }
Exemple #29
0
 public bool InsertTireSecurityCodeConfig(List <TireSecurityCodeConfig> list)
 {
     try
     {
         return(handler.InsertTireSecurityCodeConfig(list));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "InsertTireSpecParamsEditLog", ex);
         Logger.Log(Level.Error, exception, "InsertTireSpecParamsEditLog");
         throw ex;
     }
 }
 public bool InsertWheelAdapterConfigWithTid(WheelAdapterConfigWithTid wac, IEnumerable <string> tids)
 {
     try
     {
         return(handler.InsertWheelAdapterConfigWithTid(wac, tids));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "InsertWheelAdapterConfigWithTid", ex);
         Logger.Log(Level.Error, exception, "InsertWheelAdapterConfigWithTid");
         throw ex;
     }
 }