public List <SV> SortMS(List <SV> lsv) { for (int i = 0; i < lsv.Count - 1; ++i) { for (int j = i + 1; j < lsv.Count; ++j) { if (comparerL(Convert.ToInt32(lsv[i].MSSV), Convert.ToInt32(lsv[j].MSSV))) { SV temp = lsv[i]; lsv[i] = lsv[j]; lsv[j] = temp; } } } return(lsv); }
public void EditDataSV(SV s) { for (int i = 0; i < DTSV.Rows.Count; ++i) { if (DTSV.Rows[i]["MSSV"].ToString() == s.MSSV) { DTSV.Rows.RemoveAt(i); DataRow d = DTSV.NewRow(); d["MSSV"] = s.MSSV; d["NameSV"] = s.NameSV; d["NS"] = s.NS.ToString(); d["Gender"] = s.Gender.ToString(); d["ID_Lop"] = s.ID_Lop.ToString(); DTSV.Rows.InsertAt(d, i); return; } } }