public IEnumerable <EmpenhoMes> Fetch(EmpenhoMes entity) { return(DataHelper.List <EmpenhoMes>("PR_EMPENHO_MES_CONSULTAR", new SqlParameter("@id_empenho_mes", entity.Codigo), new SqlParameter("@tb_empenho_id_empenho", entity.Id) )); }
public int Add(EmpenhoMes entity) { return(DataHelper.Get <int>("PR_EMPENHO_MES_INCLUIR", new SqlParameter("@tb_empenho_id_empenho", entity.Id), new SqlParameter("@ds_mes", entity.Descricao), new SqlParameter("@vr_mes", entity.ValorMes) )); }
public int Edit(EmpenhoMes entity) { return(DataHelper.Get <int>("PR_EMPENHO_MES_ALTERAR", new SqlParameter("@id_empenho_mes", entity.Codigo), new SqlParameter("@tb_empenho_id_empenho", entity.Id), new SqlParameter("@vr_mes", entity.ValorMes) )); }
public AcaoEfetuada Alterar(EmpenhoMes objModel, int recursoId, short actionId) { try { _mes.Edit(objModel); return(AcaoEfetuada.Sucesso); } catch (Exception ex) { throw SaveLog(ex, actionId: actionId, functionalityId: recursoId); } }
public AcaoEfetuada Excluir(EmpenhoMes objModel, int recursoId, short actionId) { try { _mes.Remove(objModel.Codigo); return(AcaoEfetuada.Sucesso); } catch (Exception ex) { throw SaveLog(ex, actionId: actionId, functionalityId: recursoId); } }
public AcaoEfetuada Salvar(EmpenhoMes objModel, int recursoId, short actionId) { try { if (objModel.Codigo == 0) { objModel.Codigo = _mes.Add(objModel); } else { _mes.Edit(objModel); } return(AcaoEfetuada.Sucesso); } catch (Exception ex) { throw SaveLog(ex, actionId: actionId, functionalityId: recursoId); } }
public IEnumerable <EmpenhoMes> Buscar(EmpenhoMes objModel) { return(_mes.Fetch(objModel)); }