/// <summary> /// 设置参数 /// </summary> protected void SetParams() { ///初次加载一些参数设置成默认值 ReportTitle = "流失用户"; AxisJsonStr = "{}"; SeriesJsonStr = "[]"; //设置控件的属性值 HeadControl1.BeginTime = BeginTime; HeadControl1.EndTime = EndTime; HeadControl1.SoftID = string.Join(",", SelectedSofts.Select(p => p.ID.ToString()).ToArray()); HeadControl1.PlatID = string.Join(",", SelectedPlatforms.Select(p => ((int)p).ToString()).ToArray()); }
/// <summary> /// 生成所有的TABLE /// </summary> protected void GetAllTableHtml() { StringBuilder sb = new StringBuilder(); //传入的tab 序列值 int tabindex = 0; if (QuDao) { var channels = HeadControl1.Channel1.ChannelValues; //形成tablehtml for (int j = 0; j < ListAll.Count; j++) { string plat = ((MobileOption)ListAll[j][0].Platform).GetDescription(); if (plat == "None") { plat = "不区分平台"; } TabStr.Add(SelectedSofts.FirstOrDefault(a => a.ID == ListAll[j][0].SoftId).Name + "_" + plat + "_" + channels[QuDaoList[j]].ChannelText); sb.Append(GetOneTableHtml(ListAll[j], tabindex)); tabindex++; } } else { //形成tablehtml for (int j = 0; j < RealSoftLine.Count; j++) { if (ListAll[j].Count != 0) { string plat = ((MobileOption)ListAll[j][0].Platform).GetDescription(); if (plat == "None") { plat = "不区分平台"; } TabStr.Add(SelectedSofts.FirstOrDefault(a => a.ID == ListAll[j][0].SoftId).Name + "_" + plat); sb.Append(GetOneTableHtml(ListAll[j], tabindex)); tabindex++; } } } TableStr = sb.ToString(); }
/// <summary> /// 形成每一个tab /// </summary> /// <param name="orderUsers"></param> /// <param name="tableindex"></param> /// <returns></returns> protected string GetOneTableHtml(List <SoftUser> users, int tableindex) { List <SoftUser> orderUsers = users.OrderByDescending(p => p.StatDate).ToList(); var channels = HeadControl1.Channel1.ChannelValues; string tableName = string.Empty; if (QuDao) { tableName = orderUsers[0].SoftId + "_" + orderUsers[0].Platform + "_" + (int)Period + "_" + BeginTime.ToShortDateString() + "_" + EndTime.ToShortDateString() + "_" + channels[QuDaoList[tableindex]].ChannelValue + "_" + (int)channels[QuDaoList[tableindex]].ChannelType; } else { tableName = orderUsers[0].SoftId + "_" + orderUsers[0].Platform + "_" + (int)Period + "_" + BeginTime.ToShortDateString() + "_" + EndTime.ToShortDateString() + "_" + "-1" + "_" + "-1"; } //是否是内部软件 bool isInternalSoft = SelectedSofts.FirstOrDefault(a => a.SoftType == SoftTypeOptions.InternalSoft && a.ID == orderUsers[0].SoftId) != null; return(TableTemplateHelper.BuildStatUsersTable(orderUsers[0].SoftId, (MobileOption)orderUsers[0].Platform, isInternalSoft, QuDao, Period, "new", false, orderUsers, false, tableindex, tableName)); }
/// <summary> /// 设置参数 /// </summary> protected void SetParams() { //初次加载一些参数设置成默认值 ReportTitle = "新增用户"; AxisJsonStr = "{}"; SeriesJsonStr = "[]"; //设置控件的属性值 HeadControl1.BeginTime = BeginTime; HeadControl1.EndTime = EndTime; HeadControl1.HiddenCompareTime = false; HeadControl1.SoftID = string.Join(",", SelectedSofts.Select(p => p.ID.ToString()).ToArray()); HeadControl1.PlatID = string.Join(",", SelectedPlatforms.Select(p => ((int)p).ToString()).ToArray()); HeadControl1.Channel1.SoftId = SelectedSofts[0].ID.ToString(); HeadControl1.Channel1.Platform = HeadControl1.PlatID; /////有渠道商权限限制 //LimitChannelCustom(Convert.ToInt32(HeadControl1.Channel1.SoftId)); //规范比较时间 SetCompareTime(); }