Need help with foreach loop
I keep getting this error: [Path\ThisWorkbook.cs(161)]: The type or namespace name 'Projects' could not be found (are you missing a using directive or an assembly reference?)
What am I doing wrong? Any input would be appreciated.:D
protected void ThisWorkbook_BeforeSave(bool save, ref bool Cancel)
{
string cell = "0";
string ot = "0";
foreach(Projects p in selectedList)
{
// get regular hours
cell = "N" + p.GetRowPos().ToString();
p.SetUHours(Convert.ToInt32(xlSheet.get_Range(cell , cell).Value2.ToString()));
// get over time hours
ot = "V" + p.GetRowPos().ToString();
p.SetOTHours(Convert.ToInt32(xlSheet.get_Range(ot, ot).Value2.ToString()));
UpdateData(p);
}
}
*******(*)*******
__________________
*******(*)*******
|