Exemplo n.º 1
0
 //Thêm sách vào cơ sở dữ liệu
 public static string ThemSach(Sach_DTO ds)
 {
     if (Sach_DAO.SelectSachByName(ds.TenSach) == null)
     {
         return(Sach_DAO.Insert(ds));
     }
     else
     {
         return("Đầu sách đã tồn tại trong CSDL");
     }
 }
Exemplo n.º 2
0
 public int Them(Sach s)
 {
     if (string.IsNullOrEmpty(s.MaSach))
     {
         return(0);
     }
     if (!sachDao.Insert(s))
     {
         return(-1);
     }
     return(1);
 }
Exemplo n.º 3
0
 //Thêm 1 cuốn sách vào bảng SÁCH
 static public string Insert(Sach_DTO s)
 {
     return(Sach_DAO.Insert(s));
 }