Пример #1
0
 public DataTable LayDanhSachTheLoai()
 {
     try
     {
         TheLoaiDAO dsTheLoai = new TheLoaiDAO();
         DataTable  table     = dsTheLoai.LayDanhSachTheLoai();
         return(table);
     }
     catch (SqlException ex)
     {
         throw ex;
     }
 }
Пример #2
0
 public void ThemTheLoai(string tenTheLoai)
 {
     try
     {
         TheLoaiDAO TheLoai   = new TheLoaiDAO();
         DataTable  dsTheLoai = TheLoai.LayDanhSachTheLoai();
         string     maTheLoai = "TLS" + (int.Parse(dsTheLoai.Rows[dsTheLoai.Rows.Count - 1][0].ToString().Substring(3, 3)) + 1).ToString("000");
         TheLoai.ThemTheLoai(maTheLoai, tenTheLoai);
     }
     catch (Exception)
     {
         throw;
     }
 }