Esempio n. 1
0
 protected override void FillStatistics(AdgroupInfoEntity entity, ViewAdgroupInfoEntity statistics)
 {
     statistics.ID            = entity.ID;
     statistics.AccountName   = entity.AccountName;
     statistics.CampaignId    = entity.CampaignId ?? 0;
     statistics.CampaignName  = EntityWebHelper.GetNameById <CampaignInfoEntity>(entity.CampaignId);
     statistics.AdgroupName   = entity.Name;
     statistics.MaxPrice      = entity.MaxPrice ?? 0;
     statistics.NegativeWords = GetTotalNegativeWords(new string[] { entity.NegativeWords, entity.ExactNegativeWords }).ToString();
     statistics.Pause         = ParamWebHelper.GetDiscriptionById(3, entity.Pause.ToString());
     statistics.Status        = ParamWebHelper.GetDiscriptionById(7, entity.Status.ToString());
 }
Esempio n. 2
0
 protected override void FillStatistics(KeywordInfoEntity entity, ViewKeywordInfoEntity statistics)
 {
     statistics.ID             = entity.ID;
     statistics.AccountName    = entity.AccountName;
     statistics.CampaignId     = entity.CampaignId ?? 0;
     statistics.CampaignName   = EntityWebHelper.GetNameById <CampaignInfoEntity>(entity.CampaignId);
     statistics.AdgroupId      = entity.AdgroupId ?? 0;
     statistics.AdgroupName    = EntityWebHelper.GetNameById <AdgroupInfoEntity>(entity.AdgroupId);
     statistics.Keyword        = entity.Keyword;
     statistics.Price          = entity.Price ?? 0;
     statistics.DestinationUrl = entity.DestinationUrl;
     statistics.MatchType      = ParamWebHelper.GetDiscriptionById(8, entity.MatchType.ToString());
     statistics.Quality        = ParamWebHelper.GetDiscriptionById(10, entity.Quality.ToString());
     statistics.Pause          = ParamWebHelper.GetDiscriptionById(3, entity.Pause.ToString());
     statistics.Status         = ParamWebHelper.GetDiscriptionById(9, entity.Status.ToString());
 }
        protected override void FillStatistics(CreativeInfoEntity entity, ViewCreativeInfoEntity statistics)
        {
            statistics.ID           = entity.ID;
            statistics.AccountName  = entity.AccountName;
            statistics.CampaignId   = entity.CampaignId ?? 0;
            statistics.CampaignName = EntityWebHelper.GetNameById <CampaignInfoEntity>(entity.CampaignId ?? 0);
            statistics.AdgroupId    = entity.AdgroupId ?? 0;
            statistics.AdgroupName  = EntityWebHelper.GetNameById <AdgroupInfoEntity>(entity.AdgroupId ?? 0);
            // 拼装Title
            StringBuilder sbTitle = new StringBuilder();

            sbTitle.Append(GetColorfulInfo("<a href='#' onclick='javascript:void(0);' style='font-size:14px;text-decoration:underline;'>" + entity.Title + "</a>"));
            sbTitle.Append("<br/>");
            sbTitle.Append(GetColorfulInfo(entity.Description1));
            sbTitle.Append(GetColorfulInfo(entity.Description2));
            sbTitle.Append("<br/>");
            sbTitle.AppendFormat("<a href='{1}' alt=''>{0}</a>", entity.DisplayUrl, entity.DestinationUrl);
            statistics.Title  = sbTitle.ToString();
            statistics.Pause  = ParamWebHelper.GetDiscriptionById(3, entity.Pause.ToString());
            statistics.Status = ParamWebHelper.GetDiscriptionById(11, entity.Status.ToString());
        }