private void updateIdDoiChungChiHocVien() { BO_CAP_CHUNGCHI bo = new BO_CAP_CHUNGCHI(); //1. Load list need update DataTable vtb = new DataTable(); vtb = bo.ListNeedUpdate(); //2. Load list ID for update DataTable vtb2 = new DataTable(); vtb2 = bo.ListForUpdate(); for (int i = 0; i < vtb.Rows.Count; i++) { for (int j = 0; j < vtb2.Rows.Count; j++) { if (int.Parse(vtb.Rows[i]["CCC_ID"].ToString()) == int.Parse(vtb2.Rows[j]["CCC_ID"].ToString())) { //3. Execute update //string c = string.Empty; bo.updateChungChiDoiIDToCapChungChi(int.Parse(vtb2.Rows[j]["DOI_ID"].ToString())); } } } }