Skip to content

Instantly share code, notes, and snippets.

@sipple
Created October 13, 2010 15:21
Show Gist options
  • Save sipple/624252 to your computer and use it in GitHub Desktop.
Save sipple/624252 to your computer and use it in GitHub Desktop.
for (int i = 0; i < dummyPkgs.Count; i++)
{
DataRow rslt_row = rslt.NewRow();
rslt_row[col_pkg_no] = dummyPkgs[i].Row["package_no"];
rslt_row[col_pkg_desc] = dummyPkgs[i].Row["description"];
decimal[] zone_prices = new decimal[ZONE_COUNT];
for (int j = 0; j < ZONE_COUNT; j++)
{
zone_prices[j] = 0M;
}
realPackages.RowFilter = String.Format("parent_id={0}", dummyPkgs[i].Row["package_no"]);
for (int j = 0; j < realPackages.Count; j++)
{
prices.RowFilter = String.Format("pkg_no={0} and zone_no in ({1}) and price_type={2}",
realPackages[j].Row["package_no"],
realPackages[j].Row["zone_list"],
dummyPkgs[i].Row["price_type"]);
int limit = Math.Min(ZONE_COUNT, prices.Count);
for (int k = 0; k < prices.Count; k++)
{
zone_prices[k] += (decimal)prices[k].Row["price"];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment