Truyen2

Màu nền
Font chữ
Font size
Chiều cao dòng

Imports DAO   'Sử dụng thư viện liên kết của tầng DAO

Imports DTO

Public Class BusHocSinh

       Dim dHocSinh As New DaoHocSinh

       Public Function Them(ByVal newHS As DtoHocSinh) As String

        Dim strTB As String = ""

              Dim dtHocSinh As New DataTable

        dtHocSinh = dHocSinh.LayBangHocSinh(newHS.MaHS.ToString.Trim)

        If dtHocSinh.Rows.Count = 1 Then

            strTB = "Mã số học sinh đã có."

        End If

                     If Len(newHS.DienThoai) <> 10 Then

            strTB += Chr(13) + "Số điện thoại phải đúng 10 ký số."

        End If

               If strTB = "" Then dHocSinh.Them(newHS)

        Return strTB

    End Function

End Class

Bạn đang đọc truyện trên: Truyen2U.Pro

#dollar