Example #1
0
 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)
     {
     }
 }
Example #2
0
 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)
     {
     }
 }