public void DeleteDataRow(string MSSV) { foreach (DataRow i in DTSV.Select()) { if (i["MSSV"].ToString() == MSSV) { DTSV.Rows.Remove(i); } } DTSV.AcceptChanges(); }
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) { } }