Created
August 16, 2012 15:23
-
-
Save Sheeo/3371002 to your computer and use it in GitHub Desktop.
Sql Server SSI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void CreateNewOutputRows() | |
{ | |
string strCurrency; | |
string flRate; | |
XmlDocument xm = new XmlDocument(); | |
xm.Load(Variables.ECBRL.ToString()); | |
XmlNodeList xnode = xm.GetElementsByTagName("Cube"); | |
DateTime date = DateTime.Parse(xm.GetAttribute("time")); | |
foreach (XmlNode xmn in xnode) | |
{ | |
XmlElement currencyElement = (XmlElement)xmn; | |
if (currencyElement.HasAttributes) | |
{ | |
strCurrency = currencyElement.GetAttribute("currency").ToString(); | |
flRate =currencyElement.GetAttribute("rate"); | |
if (strCurrency.Length > 0) | |
{ | |
Output0Buffer.AddRow(); | |
Output0Buffer.Currency = strCurrency; | |
Output0Buffer.Rate = flRate; | |
Output0Buffer.LastUpdate = DateTime.Now; | |
Output0Buffer.Date = date; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment