protected void UpdateNLabel() { string number_label = string.Empty; int checkcount = 0; int num = 0;// เช็คหมายเลขฉลาก string ID = string.Empty; string Nlabel = string.Empty; dcoreUpdateUsedPerson = new DataCoreLibrary(); // List<string> Nlabel = new List<string>(); foreach (DataRow dr in personTable.Rows) { if (checkcount % totalnumber_label == 0) { number_label = arr_new[num]; ID = dr["NAVYID"].ToString(); Nlabel = number_label; dcoreUpdateUsedPerson.UpdateNLabelPerson(ID, Nlabel); num++; } else { ID = dr["NAVYID"].ToString(); Nlabel = number_label; dcoreUpdateUsedPerson.UpdateNLabelPerson(ID, Nlabel); } checkcount++; } }