Ejemplo n.º 1
0
 public int HasUnOrRecentlyCompletedOrder(string userId)
 {
     try
     {
         var orderCompCriteria = handler.SelectOrderCompJudgeCriteria(userId);
         if (orderCompCriteria != null)
         {
             if (
                 orderCompCriteria.Any(
                     od =>
                     !string.Equals(od.Status, "7Canceled") && !string.Equals(od.Status, "6Complete") &&
                     ((od.InstallShopId.GetValueOrDefault() > 0 && !string.Equals(od.Status, "3Installed")) ||
                      (od.InstallShopId.GetValueOrDefault() == 0 &&
                       (!string.Equals(od.Status, "2Shipped") ||
                        !string.Equals(od.DeliveryStatus, "3Received") && !string.Equals(od.DeliveryStatus, "3.5Signed"))))))
             {
                 return(-3);
             }
             if (
                 orderCompCriteria.Any(
                     od =>
                     od.InstallDatetime.GetValueOrDefault() > DateTime.Now.AddDays(-7) &&
                     od.InstallShopId.GetValueOrDefault() > 0 && string.Equals(od.Status, "3Installed")
                     ))
             {
                 return(-4);
             }
             if (
                 orderCompCriteria.Any(
                     od =>
                     od.DeliveryDatetime.GetValueOrDefault() > DateTime.Now.AddDays(-7) &&
                     od.InstallShopId.GetValueOrDefault() == 0 && string.Equals(od.Status, "2Shipped") && string.Equals(od.DeliveryStatus, "3Received")
                     ))
             {
                 return(-4);
             }
             if (orderCompCriteria.Any(
                     od =>
                     od.DeliveryDatetimeInLog.GetValueOrDefault() > DateTime.Now.AddDays(-7) &&
                     od.InstallShopId.GetValueOrDefault() == 0 && string.Equals(od.Status, "2Shipped") &&
                     string.Equals(od.DeliveryStatusInLog, "3.5Signed")
                     ))
             {
                 return(-4);
             }
         }
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "HasUnOrRecentlyCompletedORder", ex);
         Logger.Log(Level.Error, exception, "HasUnOrRecentlyCompletedORder");
         throw ex;
     }
     return(2);
 }
Ejemplo n.º 2
0
 public int InsertConfigApi(ConfigApi model)
 {
     try
     {
         return(DALConfigApi.InsertConfigApi(model));
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "InsertConfigApi", ex);
         Logger.Log(Level.Error, exception, "InsertConfigApi");
         throw ex;
     }
 }
Ejemplo n.º 3
0
 public bool DeleteConfigApi(int id)
 {
     try
     {
         return(DALConfigApi.DeleteConfigApi(id));
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "DeleteConfigApi", ex);
         Logger.Log(Level.Error, exception, "DeleteConfigApi");
         throw ex;
     }
 }
Ejemplo n.º 4
0
 public int UpdateBannerConfig(BannerConfig model)
 {
     try
     {
         return(handler.UpdateBannerConfig(model));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "UpdateBannerConfig", ex);
         Logger.Log(Level.Error, exception, "UpdateBannerConfig");
         throw ex;
     }
 }
Ejemplo n.º 5
0
 public bool DeleteDownloadApp(int id)
 {
     try
     {
         return(handler.DeleteDownloadApp(id));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "DeleteDownloadApp", ex);
         Logger.Log(Level.Error, exception, "DeleteDownloadApp");
         throw ex;
     }
 }
Ejemplo n.º 6
0
 public int CountBannerConfig(BannerFilterQuery queryModel)
 {
     try
     {
         return(handler.CountBannerConfig(queryModel));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "CountBannerConfig", ex);
         Logger.Log(Level.Error, exception, "CountBannerConfig");
         throw ex;
     }
 }
Ejemplo n.º 7
0
 public List <BannerConfig> QueryBannerConfig(BannerFilterQuery model, int page)
 {
     try
     {
         return(handler.QueryBannerConfig(model, page));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "QueryBannerConfig", ex);
         Logger.Log(Level.Error, exception, "QueryBannerConfig");
         throw ex;
     }
 }
Ejemplo n.º 8
0
 public bool InsertBatteryBanner(BatteryBanner model)
 {
     try
     {
         return(handler.InsertBatteryBanner(model));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "InsertBatteryBanner", ex);
         Logger.Log(Level.Error, exception, "InsertBatteryBanner");
         throw ex;
     }
 }
Ejemplo n.º 9
0
 public bool UpdateDownloadApp(Tuhu.Provisioning.DataAccess.Entity.DownloadApp model, int id)
 {
     try
     {
         return(handler.UpdateDownloadApp(model, id));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "UpdateDownloadApp", ex);
         Logger.Log(Level.Error, exception, "UpdateDownloadApp");
         throw ex;
     }
 }
Ejemplo n.º 10
0
 public List <NoticeChannel> QueryNoticeChannel()
 {
     try
     {
         return(handler.QueryNoticeChannel());
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "QueryNoticeChannel", ex);
         Logger.Log(Level.Error, exception, "QueryNoticeChannel");
         throw ex;
     }
 }
Ejemplo n.º 11
0
 public int InsertFriendLink(FriendLink model)
 {
     try
     {
         return(handler.InsertFriendLink(model));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "InsertFriendLink", ex);
         Logger.Log(Level.Error, exception, "InsertFriendLink");
         throw ex;
     }
 }
Ejemplo n.º 12
0
 public List <FriendLink> GetFriendLink()
 {
     try
     {
         return(handler.GetFriendLink());
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "GetFriendLink", ex);
         Logger.Log(Level.Error, exception, "GetFriendLink");
         throw ex;
     }
 }
Ejemplo n.º 13
0
 public List <Region> GetRegion(int id)
 {
     try
     {
         return(handler.GetRegion(id));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "GetRegion", ex);
         Logger.Log(Level.Error, exception, "GetRegion");
         throw ex;
     }
 }
Ejemplo n.º 14
0
 public List <BatteryBanner> GetBatteryBanner(string sqlStr, int pageSize, int pageIndex, out int recordCount)
 {
     try
     {
         return(handler.GetBatteryBanner(sqlStr, pageSize, pageIndex, out recordCount));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "GetBatteryBanner", ex);
         Logger.Log(Level.Error, exception, "GetBatteryBanner");
         throw ex;
     }
 }
Ejemplo n.º 15
0
 public ConfigCoupon GetConfigCoupon()
 {
     try
     {
         return(handler.GetConfigCoupon());
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "GetConfigCoupon", ex);
         Logger.Log(Level.Error, exception, "GetConfigCoupon");
         throw ex;
     }
 }
Ejemplo n.º 16
0
 public List <HomePagePopup> QueryHomePagePopup(HomePagePopupQuery model, int page)
 {
     try
     {
         return(handler.QueryHomePagePopup(model, page));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "QueryHomePagePopup", ex);
         Logger.Log(Level.Error, exception, "QueryHomePagePopup");
         throw ex;
     }
 }
Ejemplo n.º 17
0
 public bool UpdateConfigCoupon(ConfigCoupon model)
 {
     try
     {
         return(handler.UpdateConfigCoupon(model));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "UpdateConfigCoupon", ex);
         Logger.Log(Level.Error, exception, "UpdateConfigCoupon");
         throw ex;
     }
 }
Ejemplo n.º 18
0
 public int CountHomePagePopup(HomePagePopupQuery model)
 {
     try
     {
         return(handler.CountHomePagePopup(model));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "CountHomePagePopup", ex);
         Logger.Log(Level.Error, exception, "CountHomePagePopup");
         throw ex;
     }
 }
Ejemplo n.º 19
0
 public Tuhu.Provisioning.DataAccess.Entity.DownloadApp GetDownloadAppById(int id)
 {
     try
     {
         return(handler.GetDownloadAppById(id));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "GetDownloadAppById", ex);
         Logger.Log(Level.Error, exception, "GetDownloadAppById");
         throw ex;
     }
 }
Ejemplo n.º 20
0
 public List <Tuhu.Provisioning.DataAccess.Entity.DownloadApp> GetDownloadAppList(Tuhu.Provisioning.DataAccess.Entity.DownloadApp model, int pageSize, int pageIndex, out int recordCount)
 {
     try
     {
         return(handler.GetDownloadAppList(model, pageSize, pageIndex, out recordCount));
     }
     catch (TuhuBizException)
     {
         throw;
     }
     catch (Exception ex)
     {
         var exception = new DownloadAppException(1, "GetDownloadAppList", ex);
         Logger.Log(Level.Error, exception, "GetDownloadAppList");
         throw ex;
     }
 }