I had a quick look. I think the problem is in the foreach loop:
foreach (var pvalue in updateStatus)
{
System.Console.WriteLine(updateStatus[0].DefectStatus);
System.Console.WriteLine(updateStatus[0].DefectID);
System.Console.WriteLine(updateStatus[0].MaintenanceID);
updateStatus[0].DefectStatus = "Fixed";
context.SubmitChanges();
}
Its not updating DefectStatus because the foreach loop isn't triggering. Ensure there's data in the list variable named updateStatus before the list executes. Try something like:
if (updateStatus.Count == 0)
{
}
for (int i = 0; i < updateStatus.Count; i++)
{
}