Wednesday, January 25, 2012

Blink 182 Miss You

Capo 3rd Fret
G D Em C

Monday, January 16, 2012

Paging Records Lambda Linq

Tasks task = new Tasks();

// *** GET SYMBOLS ***
var symbolList = db.ST_D_SYMBOL.Get().Where(sym => (sym.DATE_UPDATED > DateTime.Now.AddMonths(-1)) || sym.DATE_UPDATED == null).OrderBy(x => x.SYMBOL).ToList();

// *** GRAB DATA FROM YAHOO FOR TODAY ***

int total = symbolList.Count();
int rowPerPage = 100;
int pages = total / rowPerPage;

if((total % rowPerPage) > 0)
{
pages++;
}

for (int page = 1; page < pages; page++)
{
List symbolNameList = (from x in symbolList select x.SYMBOL).Skip((page - 1) * rowPerPage).Take(rowPerPage).ToList();
task.RetrieveDailyStockData(symbolNameList, fileName);
}

Check This Out!

More Links to Good Information