Browse Source

分润品牌id从数据库读取

lcl 2 năm trước cách đây
mục cha
commit
547bff2aea

+ 2 - 1
AppStart/Helper/Profit/ProfitHelper.cs

@@ -1740,7 +1740,8 @@ namespace MySystem
             }
             function.WritePage("/ProfitStat/", Month + ".txt", DateTime.Now.ToString());
             WebCMSEntities db = new WebCMSEntities();
-            for (int i = 1; i <= 12; i++) //品牌
+            List<int> BrandIds = db.KqProducts.OrderBy(m => m.Id).ToList().Select(m => m.Id).ToList();
+            foreach (int i in BrandIds) //品牌
             {
                 for (int j = 0; j <= 1; j++) //卡类型
                 {

+ 2 - 1
AppStart/Helper/Profit/ProfitHelperV2.cs

@@ -60,7 +60,8 @@ namespace MySystem
             try
             {
                 WebCMSEntities db = new WebCMSEntities();
-                for (int i = 1; i <= 12; i++) //品牌
+                List<int> BrandIds = db.KqProducts.OrderBy(m => m.Id).ToList().Select(m => m.Id).ToList();
+                foreach (int i in BrandIds) //品牌
                 {
                     for (int j = 0; j <= 1; j++) //卡类型
                     {