using Ant.Data; using Ant.ORM; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web; namespace ChangFa.Machinery.WebPage { public class GetCommon { public static string GetReportItem(string id, string sepid) { string itemstr = ""; string strsql = @"SELECT b.SmallEventName from YW_MatchReport as a LEFT JOIN YW_ProjectEntry as b on a.PEID=b.ID where a.SporterID='" + id + "' and a.SEPID='" + sepid + "'"; using (AntORM orm = new AntORM()) { try { orm.db = DataAccessFactory.CreateDataConnection("CyclingItem"); RequestItemSqlModel request = new RequestItemSqlModel { newSt = new SqlNote() { Author = "季健国", NewSt = new System.Diagnostics.StackTrace(true), SqlDesc = "查询赛事的单个实体方法" }, }; request.StrSql = strsql; var result = orm.GetDataTableList(request); if (result.IsSuccess) { foreach (DataRow dr in result.DataTable.Rows) { itemstr = (itemstr.IsEmpty()) ? dr[0].ToString() : itemstr + ";" + dr[0].ToString(); } } } catch (Exception ex) { } } return itemstr; } } }