public bool TestPROJECTTEMPLET(string ID, out string Message) { HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); string errors = string.Empty; var m_BLL = new SCHEMEBLL(); var entity = m_BLL.GetById(ID); if (entity != null) { if (entity.PROJECTTEMPLET != null && entity.PROJECTTEMPLET.Count > 0) { foreach (var iEntity in entity.PROJECTTEMPLET) { if (!string.IsNullOrWhiteSpace(iEntity.HTMLVALUE)) { doc.LoadHtml(iEntity.HTMLVALUE); string data = AnalyticHTML.Getinput(doc); AnalyticHTML.GetData(doc); string data2 = AnalyticHTML.GetinputHead(doc); if (!string.IsNullOrWhiteSpace(data2)) { errors += "<br/><br/>thead标签中,name是不能相同的" + iEntity.ID + iEntity.RULE.ID + iEntity.RULE.NAMEOTHER + data2; } if (!string.IsNullOrWhiteSpace(data)) { errors += iEntity.ID + iEntity.RULE.ID + iEntity.RULE.NAMEOTHER + data; } } } } } Message = errors; return(false); }
public bool Test(string ID, out string Message) { HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); string errors = string.Empty; IBLL.IPREPARE_SCHEMEBLL m_BLL = new PREPARE_SCHEMEBLL(); PREPARE_SCHEME entity = m_BLL.GetById(ID); string saveFileName = ""; if (entity != null) { ExportType type = GetExportType(entity, "ExportOriginal"); if (entity.QUALIFIED_UNQUALIFIED_TEST_ITE != null && entity.QUALIFIED_UNQUALIFIED_TEST_ITE.Count > 0) { TableTemplates allTableTemplates = GetTableTemplates(type); SpecialCharacters allSpecialCharacters = GetSpecialCharacters(); entity.QUALIFIED_UNQUALIFIED_TEST_ITE = entity.QUALIFIED_UNQUALIFIED_TEST_ITE.OrderBy(p => p.SORT).ToList(); string xml = string.Empty; foreach (QUALIFIED_UNQUALIFIED_TEST_ITE iEntity in entity.QUALIFIED_UNQUALIFIED_TEST_ITE) { //iEntity.RULEID; if (!string.IsNullOrWhiteSpace(iEntity.HTMLVALUE)) { doc.LoadHtml(iEntity.HTMLVALUE); //测试的时候使用 string data = AnalyticHTML.Getinput(doc); if (!string.IsNullOrWhiteSpace(data)) { errors += iEntity.ID + iEntity.RULENJOINAME + data; } } } var da = xml; } } Message = errors; return(false); }