public void DeleteDataRow(SV s) { try { foreach (DataRow i in DTSV.Rows) { if (i["MSSV"].ToString() == s.MSSV) { DTSV.Rows.Remove(i); } } DTSV.AcceptChanges(); } catch (Exception) { } }
public void EditDataRow(SV s) { try { foreach (DataRow i in DTSV.Rows) { if (i["MSSV"].ToString() == s.MSSV) { i["NameSV"] = s.NameSV; i["Gender"] = s.Gender; i["NgaySinh"] = s.NgaySinh; i["ID_Lop"] = s.ID_Lop; } } } catch (Exception) { } }