public void Excluir(Subtarefa_adiada variavel) { try { DBSession session = new DBSession(); Query query = session.CreateQuery("DELETE FROM Subtarefa_adiada WHERE subsubtarefa_id = @subsubtarefa_id"); query.SetParameter("subtarefa_id", variavel.subtarefa_id); query.ExecuteUpdate(); session.Close(); } catch (Exception erro) { throw erro; } }
public void Salvar(Subtarefa_adiada variavel) { try { DBSession session = new DBSession(); Query query = session.CreateQuery("INSERT INTO Subtarefa_adiada (subsubtarefa_id, painel, data, de, para) VALUES (@subsubtarefa_id, @painel, @data, @de, @para) "); query.SetParameter("subtarefa_id", variavel.subtarefa_id) .SetParameter("painel", variavel.painel.codigo) .SetParameter("data", variavel.data) .SetParameter("de", variavel.de) .SetParameter("para", variavel.para); query.ExecuteUpdate(); session.Close(); } catch (Exception erro) { throw erro; } }