private void AddScrToReport(int id, XmlDocument document, XmlNode node) { XmlNode node1 = document.CreateNode(XmlNodeType.Element, null, "ID", null); node1.InnerText = id.ToString(); node.AppendChild(node1); ReadField[] fieldArray1 = this.TrackerFields.Fields; for (int num1 = 0; num1 < fieldArray1.Length; num1++) { ReadField field1 = fieldArray1[num1]; node1 = document.CreateNode(XmlNodeType.Element, null, field1.FieldName.Replace(" ", ""), null); node1.InnerText = this.TrackerServer.GetFieldValueString(id, field1.FieldName); node.AppendChild(node1); } if (this.TrackerFields.Description) { XmlNode node2 = document.CreateNode(XmlNodeType.Element, null, "Description", null); node2.InnerText = this.TrackerServer.GetDescription(id); node.AppendChild(node2); } if (this.TrackerFields.LastNote) { XmlNode node3 = document.CreateNode(XmlNodeType.Element, null, "LastNote", null); node3.InnerText = this.TrackerServer.GetMostRecentNote(id); node.AppendChild(node3); } }
private void AddMetaDataToReport(XmlDocument document, XmlNode fieldsNode) { XmlNode node1 = document.CreateNode(XmlNodeType.Element, null, "Field", null); node1.InnerText = "ID"; fieldsNode.AppendChild(node1); ReadField[] fieldArray1 = this.TrackerFields.Fields; for (int num1 = 0; num1 < fieldArray1.Length; num1++) { ReadField field1 = fieldArray1[num1]; node1 = document.CreateNode(XmlNodeType.Element, null, "Field", null); node1.InnerText = field1.FieldName.Replace(" ", ""); fieldsNode.AppendChild(node1); } if (this.TrackerFields.Description) { XmlNode node2 = document.CreateNode(XmlNodeType.Element, null, "Field", null); node2.InnerText = "Description"; fieldsNode.AppendChild(node2); } if (this.TrackerFields.LastNote) { XmlNode node3 = document.CreateNode(XmlNodeType.Element, null, "Field", null); node3.InnerText = "LastNote"; fieldsNode.AppendChild(node3); } }
public void Test() { this.FlatScrIdList = "1000,905"; this.TrackerFields = new ReadFieldSet(); ReadField[] fieldArray1 = new ReadField[] { new ReadField("Submit Type"), new ReadField("Title") }; this.TrackerFields.Fields = fieldArray1; this.ReportFile = @"C:\temp\trackers.xml"; this.ConnectionInformation = new ConnectionInformation(); ConnectionInformation information1 = this.ConnectionInformation; information1.DBMSLoginMode = 2; information1.DBMSServer = "Jupiter"; information1.DBMSType = "Tracker SQL Server Sys"; information1.DBMSPassword = "******"; information1.DBMSUserName = "******"; information1.ProjectName = "EF"; information1.UserName = "******"; information1.UserPWD = "password"; information1 = null; try { this.ExecuteTask(); } catch (Exception exception) { Console.WriteLine(exception.ToString()); throw; } try { XmlDocument document1 = new XmlDocument(); document1.Load(this.ReportFile); } catch (Exception exception) { Console.WriteLine(exception.ToString()); throw; } }
public bool Equals(ReadField field) { return(this.FieldName.Equals(field.FieldName)); }