public IEnumerable <ReservaMes> Fetch(ReservaMes entity) { return(DataHelper.List <ReservaMes>("PR_RESERVA_MES_CONSULTAR", new SqlParameter("@id_reserva_mes", entity.Codigo), new SqlParameter("@id_reserva", entity.Id) )); }
public AcaoEfetuada Salvar(ReservaMes objModel, int recursoId, short actionId) { try { if (objModel.Codigo == 0) { objModel.Codigo = _reservaMes.Add(objModel); } else { _reservaMes.Edit(objModel); } var arg = string.Format("Reserva Mes {0}, Codigo {1}", objModel.Descricao, objModel.ValorMes); if (recursoId > 0) { return(LogSucesso(actionId, recursoId, arg)); } return(AcaoEfetuada.Sucesso); } catch (Exception ex) { throw SaveLog(ex, actionId: actionId, functionalityId: recursoId); } }
public int Add(ReservaMes entity) { return(DataHelper.Get <int>("PR_RESERVA_MES_INCLUIR", new SqlParameter("@id_reserva", entity.Id), new SqlParameter("@ds_mes", entity.Descricao), new SqlParameter("@vr_mes", entity.ValorMes) )); }
public int Edit(ReservaMes entity) { return(DataHelper.Get <int>("PR_RESERVA_MES_ALTERAR", new SqlParameter("@id_reserva_mes", entity.Codigo), new SqlParameter("@id_reserva", entity.Id), new SqlParameter("@ds_mes", entity.Descricao), new SqlParameter("@vr_mes", entity.ValorMes) )); }
public AcaoEfetuada Alterar(ReservaMes objModel, int recursoId, short actionId) { try { _reservaMes.Edit(objModel); return(AcaoEfetuada.Sucesso); } catch (Exception ex) { throw SaveLog(ex, actionId: actionId, functionalityId: recursoId); } }
public AcaoEfetuada Excluir(ReservaMes objModel, int recursoId, short actionId) { try { _reservaMes.Remove(objModel.Codigo); return(AcaoEfetuada.Sucesso); } catch (Exception ex) { throw SaveLog(ex, actionId: actionId, functionalityId: recursoId); } }
public IEnumerable <ReservaMes> Buscar(ReservaMes objModel) { return(_reservaMes.Fetch(objModel)); }