46 lines
949 B
C#
46 lines
949 B
C#
using System.Collections.Generic;
|
|
using DALL;
|
|
using MLL;
|
|
|
|
namespace BLL
|
|
{
|
|
public class BLLAgenda
|
|
{
|
|
private readonly DALAgenda dal;
|
|
|
|
public BLLAgenda(string connectionString)
|
|
{
|
|
dal = new DALAgenda(connectionString);
|
|
}// 🔹 CONSTRUTOR
|
|
|
|
// 🔹 LISTAR
|
|
public List<ModeloAgenda> Listar()
|
|
{
|
|
return dal.Listar();
|
|
}
|
|
|
|
// 🔹 CARREGAR POR ID
|
|
public ModeloAgenda CarregarModeloAgenda(int id)
|
|
{
|
|
return dal.CarregarModeloAgenda(id);
|
|
}
|
|
|
|
// 🔹 INSERIR
|
|
public bool Inserir(ModeloAgenda obj)
|
|
{
|
|
return dal.Inserir(obj);
|
|
}
|
|
|
|
// 🔹 ALTERAR
|
|
public bool Alterar(ModeloAgenda obj)
|
|
{
|
|
return dal.Alterar(obj);
|
|
}
|
|
|
|
// 🔹 EXCLUIR
|
|
public bool Excluir(int id)
|
|
{
|
|
return dal.Excluir(id);
|
|
}
|
|
}
|
|
} |