Esempio n. 1
0
 public void AddPageAfterHtmlCodeIfNotExists(string pageJsName)
 {
     if (!FootCodes.ContainsKey(pageJsName))
     {
         FootCodes.Add(pageJsName, GetJsCode(pageJsName));
     }
 }
Esempio n. 2
0
 public async Task AddPageAfterHtmlCodeIfNotExistsAsync(string pageJsName)
 {
     if (!FootCodes.ContainsKey(pageJsName))
     {
         FootCodes.Add(pageJsName, await GetJsCodeAsync(pageJsName));
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 将一个页面的js复制给本页面,提供给分页时使用
 /// add by sessionliang at 20151209
 /// </summary>
 /// <param name="lastPageInfo"></param>
 public void AddLastPageScript(PageInfo lastPageInfo)
 {
     foreach (var key in lastPageInfo.BodyCodes.Keys)
     {
         if (!BodyCodes.ContainsKey(key))
         {
             BodyCodes.Add(key, lastPageInfo.BodyCodes[key]);
         }
     }
     foreach (var key in lastPageInfo.FootCodes.Keys)
     {
         if (!FootCodes.ContainsKey(key))
         {
             FootCodes.Add(key, lastPageInfo.FootCodes[key]);
         }
     }
     foreach (var key in lastPageInfo.HeadCodes.Keys)
     {
         if (!HeadCodes.ContainsKey(key))
         {
             HeadCodes.Add(key, lastPageInfo.HeadCodes[key]);
         }
     }
 }