Skip to content

Instantly share code, notes, and snippets.

@Sheeo
Created August 16, 2012 15:23
Show Gist options
  • Save Sheeo/3371002 to your computer and use it in GitHub Desktop.
Save Sheeo/3371002 to your computer and use it in GitHub Desktop.
Sql Server SSI
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