예제 #1
0
 public static Mall_CheckRequestRuleDetail[] GetMall_CheckRequestRuleDetailListShiLi(Mall_CheckRequestRuleDetail[] list)
 {
     if (list.Length > 0)
     {
         var category_list  = Mall_CheckCategory.GetMall_CheckCategories();
         var checkinfo_list = Mall_CheckInfo.GetMall_CheckInfos();
         foreach (var item in list)
         {
             item.CategoryType = item.EarnType;
             var my_checkinfo = checkinfo_list.FirstOrDefault(p => p.ID == item.RuleID);
             if (my_checkinfo != null)
             {
                 item.CheckName  = my_checkinfo.CheckName;
                 item.StartPoint = my_checkinfo.StartPoint;
                 item.EndPoint   = my_checkinfo.EndPoint;
                 var my_category = category_list.FirstOrDefault(p => p.ID == my_checkinfo.CheckCategoryID);
                 if (my_category != null)
                 {
                     item.CategoryName = my_category.CategoryName;
                 }
             }
             else
             {
                 item.CheckName    = "固定积分";
                 item.CategoryName = item.Title;
                 item.StartPoint   = 0;
                 item.EndPoint     = 0;
             }
         }
     }
     return(list);
 }
예제 #2
0
 private void SetInfo(Foresight.DataAccess.Mall_CheckInfo data)
 {
     this.tdCheckName.Value    = data.CheckName;
     this.tdCheckSummary.Value = data.CheckSummary;
     this.tdStartPoint.Value   = data.StartPoint > 0 ? data.StartPoint.ToString() : "";
     this.tdEndPoint.Value     = data.EndPoint > 0 ? data.EndPoint.ToString() : "";
     this.CategoryID           = data.CheckCategoryID;
 }