private static void WriteElectionData(XmlWriter writer, string electionKey) { writer.WriteStartElement("election"); writer.WriteAttributeString("key", electionKey); ElectionsTable table = Elections.GetDataByElectionKey(electionKey); if (table.Count == 1) { ElectionsRow row = table[0]; writer.WriteAttributeString("description", row.ElectionDesc); } writer.WriteEndElement(); }
private void AddElectionFields(IDictionary electionsRecord, ElectionsRow electionsRow) { AddField(electionsRecord, "electionKey", electionsRow.ElectionKey); AddField(electionsRecord, "stateCode", electionsRow.StateCode); AddField(electionsRecord, "electionDate", FormatDate(electionsRow.ElectionDate)); AddField(electionsRecord, "electionType", electionsRow.ElectionType); AddField(electionsRecord, "nationalPartyCode", electionsRow.NationalPartyCode); AddField(electionsRecord, "electionDesc", electionsRow.ElectionDesc); AddField(electionsRecord, "electionAdditionalInfo", electionsRow.ElectionAdditionalInfo); if (_Dates) { AddField(electionsRecord, "registrationDeadline", FormatDate(electionsRow.RegistrationDeadline)); AddField(electionsRecord, "earlyVotingBegin", FormatDate(electionsRow.EarlyVotingBegin)); AddField(electionsRecord, "earlyVotingEnd", FormatDate(electionsRow.EarlyVotingEnd)); AddField(electionsRecord, "mailBallotBegin", FormatDate(electionsRow.MailBallotBegin)); AddField(electionsRecord, "mailBallotEnd", FormatDate(electionsRow.MailBallotEnd)); AddField(electionsRecord, "mailBallotDeadline", FormatDate(electionsRow.MailBallotDeadline)); AddField(electionsRecord, "absenteeBallotBegin", FormatDate(electionsRow.AbsenteeBallotBegin)); AddField(electionsRecord, "absenteeBallotEnd", FormatDate(electionsRow.AbsenteeBallotEnd)); AddField(electionsRecord, "absenteeBallotDeadline", FormatDate(electionsRow.AbsenteeBallotDeadline)); } }
public LinkInfo(ElectionsRow electionsRow) { Description = electionsRow.ElectionDesc; }