//cap nhat loai sách public bool capNhapLoaiSach(ET_LoaiSach ls) { try { _cn.Open(); SqlCommand cmd = new SqlCommand("sp_capnhapLS", _cn); cmd.CommandText = "sp_capnhapLS"; cmd.CommandType = CommandType.StoredProcedure; SqlParameter p_ma = new SqlParameter("@MaLoaiSach", ls.MaLoaiSach); cmd.Parameters.Add(p_ma); SqlParameter p_ten = new SqlParameter("@TenLoaiSach", ls.TenLoaiSach); cmd.Parameters.Add(p_ten); if (cmd.ExecuteNonQuery() > 0) { return(true); } else { return(false); } } catch (Exception ex) { return(false); } finally { _cn.Close(); } }
public bool SuaLoaiSach(ET_LoaiSach s) { return(ls.capNhapLoaiSach(s)); }
public bool ThemLoaiSach(ET_LoaiSach s) { return(ls.themLoaiSach(s)); }