private string GetKFSendImageJson(string openid, ArticleInfo articleinfo) { System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); if (articleinfo != null && articleinfo != null) { switch (articleinfo.ArticleType) { case ArticleType.News: break; case (ArticleType)3: goto IL_200; case ArticleType.List: { stringBuilder.Append(string.Concat(new string[] { "{\"title\":\"", this.String2Json(articleinfo.Title), "\",\"description\":\"", this.String2Json(articleinfo.Memo), "\",\"url\":\"", this.String2Json(this.FormatUrl(articleinfo.Url)), "\",\"picurl\":\"", this.String2Json(this.FormatUrl(articleinfo.ImageUrl)), "\"}" })); System.Collections.Generic.IList <ArticleItemsInfo> itemsInfo = articleinfo.ItemsInfo; using (System.Collections.Generic.IEnumerator <ArticleItemsInfo> enumerator = itemsInfo.GetEnumerator()) { while (enumerator.MoveNext()) { ArticleItemsInfo current = enumerator.Current; stringBuilder.Append(string.Concat(new string[] { ",{\"title\":\"", this.String2Json(current.Title), "\",\"description\":\"\",\"url\":\"", this.String2Json(this.FormatUrl(current.Url)), "\",\"picurl\":\"", this.String2Json(this.FormatUrl(current.ImageUrl)), "\"}" })); } goto IL_200; } break; } default: goto IL_200; } stringBuilder.Append(string.Concat(new string[] { "{\"title\":\"", this.String2Json(articleinfo.Title), "\",\"description\":\"", this.String2Json(articleinfo.Memo), "\",\"url\":\"", this.String2Json(this.FormatUrl(articleinfo.Url)), "\",\"picurl\":\"", this.String2Json(this.FormatUrl(articleinfo.ImageUrl)), "\"}" })); } IL_200: return(string.Concat(new string[] { "{\"touser\":\"", openid, "\",\"msgtype\":\"news\",\"news\":{\"articles\": [", stringBuilder.ToString(), "]}}" })); }
protected string GetGameMenu() { System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); int gameId = 0; if (int.TryParse(base.Request.QueryString["gameId"], out gameId)) { System.Collections.Generic.IList <GamePrizeInfo> gamePrizeListsByGameId = GameHelper.GetGamePrizeListsByGameId(gameId); if (gamePrizeListsByGameId != null && gamePrizeListsByGameId.Count <GamePrizeInfo>() > 0) { int num = 0; using (System.Collections.Generic.IEnumerator <GamePrizeInfo> enumerator = gamePrizeListsByGameId.GetEnumerator()) { while (enumerator.MoveNext()) { GamePrizeInfo current = enumerator.Current; string arg = ""; if (num == 0) { arg = "active"; } if (num > 0) { stringBuilder.AppendFormat("<li class=\"{0}\" id=\"li{2}\" lival=\"{2}\">{1}<i class='' onclick='DelPrize(this)'></i></li>", arg, current.PrizeName, current.PrizeId); } else { stringBuilder.AppendFormat("<li class=\"{0}\" id=\"li{2}\" lival=\"{2}\">{1}</li>", arg, current.PrizeName, current.PrizeId); } num++; } goto IL_119; } } stringBuilder.AppendFormat("<li class=\"{0}\">{1}</li>", "active", "一等奖"); this.hfIndex.Value = "1"; } else { stringBuilder.AppendFormat("<li class=\"{0}\">{1}</li>", "active", "一等奖"); this.hfIndex.Value = "1"; } IL_119: return(stringBuilder.ToString()); }
public IEnumerator <T> GetEnumerator() { return(list.GetEnumerator()); }
private void BindEquInfo() { new ResResourceService(); EquEquipmentTypeService equEquipmentTypeService = new EquEquipmentTypeService(); EquEquipment byId = this.equSer.GetById(this.id); this.lblEquCode.Text = byId.EquCode; this.lblEquName.Text = byId.EquName; EquEquipmentType byId2 = equEquipmentTypeService.GetById(byId.TypeId); if (byId2 != null) { this.lblEquTypeName.Text = byId2.Name; } if (byId.SupplierId.HasValue) { XPMBasicContactCorpService xPMBasicContactCorpService = new XPMBasicContactCorpService(); XPMBasicContactCorp byId3 = xPMBasicContactCorpService.GetById(byId.SupplierId.Value); if (byId3 != null) { this.lblCorpName.Text = byId3.CorpName; } } this.lblFactoryNumber.Text = byId.FactoryNumber; this.lblFactoryDate.Text = this.ConvertToString(byId.FactoryDate); this.lblPurchaseDate.Text = this.ConvertToString(byId.PurchaseDate); this.lblDepreciationRate.Text = byId.DepreciationRate.ToString("0.000"); this.lblPeriodicVertification.Text = byId.PeriodicVertification; this.lblDurableYear.Text = byId.DurableYear; this.lblPurchasePrice.Text = byId.PurchasePrice.ToString("0.000"); this.lblState.Text = this.GetStateOrProperty("EquState", byId.State); this.lblEquProperty.Text = this.GetStateOrProperty("EquProperty", byId.EquProperty); this.lblReceiptNo.Text = byId.ReceiptNo; if (equEquipmentTypeService.IsShip(byId.TypeId)) { this.trShip.Style["Display"] = "Block"; this.lblShipLength.Text = byId.ShipLength; this.lblShipWidth.Text = byId.ShipWidth; this.lblShipCapacity.Text = byId.ShipCapaticy; EquShipTechnicalParasService equShipTechnicalParasService = new EquShipTechnicalParasService(); System.Collections.Generic.IList <EquShipTechnicalParas> equShipTechParasByEquId = equShipTechnicalParasService.GetEquShipTechParasByEquId(this.id); if (equShipTechParasByEquId == null || equShipTechParasByEquId.Count <= 0) { goto IL_352; } if (equShipTechParasByEquId.Count == 1) { this.lblOtherShipInfo.Text = equShipTechParasByEquId.First <EquShipTechnicalParas>().OtherShipInfo; } int num = 0; Label label = null; using (System.Collections.Generic.IEnumerator <EquShipTechnicalParas> enumerator = equShipTechParasByEquId.GetEnumerator()) { while (enumerator.MoveNext()) { EquShipTechnicalParas current = enumerator.Current; if (num == 0) { this.lblOtherShipInfo.Text = string.Format("参数{0}: {1}", (num + 1).ToString(), current.OtherShipInfo); label = (this.plOtherShips.FindControl("lblOtherShipInfo") as Label); } else { Literal literal = new Literal(); literal.Text = "<br />"; this.plOtherShips.Controls.Add(literal); Label label2 = new Label(); label2.ID = label.ID + num.ToString(); label2.Text = string.Format("参数{0}: {1}", num + 1, current.OtherShipInfo); this.plOtherShips.Controls.Add(label2); } num++; } goto IL_352; } } this.trShip.Style["Display"] = "None"; IL_352: this.lblMiddleInspectDate.Text = this.ConvertToString(byId.MiddleInspectDate); this.lblYearInspectDate.Text = this.ConvertToString(byId.YearInspectDate); this.lblOtherCredentials.Text = byId.OtherCredentials; this.lblAnnex.Text = FileView.FilesBind(1901, byId.Id); this.lblNotes.Text = byId.Note; }
protected string GetMemberCustomGroup() { System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); System.Collections.Generic.IList <CustomGroupingInfo> customGroupingList = CustomGroupingHelper.GetCustomGroupingList(); if (customGroupingList != null && customGroupingList.Count > 0) { using (System.Collections.Generic.IEnumerator <CustomGroupingInfo> enumerator = customGroupingList.GetEnumerator()) { while (enumerator.MoveNext()) { CustomGroupingInfo current = enumerator.Current; stringBuilder.Append(" <label class=\"middle mr20\">"); stringBuilder.AppendFormat("<input type=\"checkbox\" class=\"CustomGroup\" value=\"{0}\">{1}", current.Id, current.GroupName); stringBuilder.Append(" </label>"); } goto IL_7D; } } stringBuilder.Append("暂无分组信息,去<a href='../member/CustomDistributorList.aspx'>创建新分组</a>"); IL_7D: return(stringBuilder.ToString()); }
private void getEquTypeNodes(string typeId, TreeNode parentNode) { System.Collections.Generic.IList <EquEquipmentType> targetType = this.getTargetType(false, typeId); if (targetType != null && targetType.Count > 0) { using (System.Collections.Generic.IEnumerator <EquEquipmentType> enumerator = targetType.GetEnumerator()) { while (enumerator.MoveNext()) { EquEquipmentType current = enumerator.Current; TreeNode treeNode = this.getTreeNode(current); this.getEquTypeNodes(current.Id, treeNode); parentNode.ChildNodes.Add(treeNode); } return; } } this.addEquipmentNode(typeId, parentNode); }