コード例 #1
0
        public void TestDelete()
        {
            DataTable tb  = nvd.getEmployeeTable();
            int       row = 2;

            nvd.Del(row, tb);
            int expected = 2;
            int actual   = tb.Rows.Count;

            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
 public int Del(int row, DataTable dt)
 {
     try
     {
         int number = em.Del(row, dt);
         if (number > 0)
         {
             return(number);
         }
         else
         {
             return(-1);
         }
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }