public BackEnd.Controllers.Response.CadastroPetResponse cadastrarPet(BackEnd.Controllers.Request.CadastroPetRequest request) { Models.TbPet Pet = new Models.TbPet(); Pet.NmPet = request.NomePet; Pet.TpPet = request.TipoPet; Pet.DsMedicamentos = request.Medicamentos; Pet.DsPeso = request.Peso; Pet.DsPorte = request.Porte; Pet.DsRaca = request.Raca; Pet.DsSexo = request.Sexo; Pet.DtNascimento = request.Nascimento; Pet.IdCliente = request.IdCliente; ctx.Add(Pet); ctx.SaveChanges(); BackEnd.Controllers.Response.CadastroPetResponse response = new BackEnd.Controllers.Response.CadastroPetResponse(); response.IdCliente = request.IdCliente; response.IdPet = Pet.IdPet; response.Medicamentos = request.Medicamentos; response.Nascimento = request.Nascimento; response.NomePet = request.NomePet; response.Peso = request.Peso; response.Porte = request.Porte; response.Raca = request.Raca; response.Sexo = request.Sexo; response.TipoPet = request.TipoPet; return(response); }
public BackEnd.Controllers.Response.CirurgiaResponse AgendarCirurgia(BackEnd.Controllers.Request.CirurgiaRequest request) { Models.TbCirurgia tbCirurgia = new Models.TbCirurgia(); tbCirurgia.DsLocal = request.Local; tbCirurgia.DsObservacoes = request.Observacoes; tbCirurgia.DtCirurgia = request.Data; tbCirurgia.IdCliente = request.IdCliente; tbCirurgia.IdPet = request.IdPet; tbCirurgia.DsCirurgia = request.Cirurgia; ctx.Add(tbCirurgia); ctx.SaveChanges(); BackEnd.Controllers.Response.CirurgiaResponse response = new BackEnd.Controllers.Response.CirurgiaResponse(); response.Local = request.Local; response.Observacoes = request.Observacoes; response.Data = request.Data; response.IdCliente = request.IdCliente; response.IdPet = request.IdPet; response.Cirurgia = request.Cirurgia; return(response); }
public BackEnd.Controllers.Response.BanhoTosaResponse AgendamentoBanhoTosa(BackEnd.Controllers.Request.BanhoTosaRequest request) { Models.TbBanhoTosa tbBanhoTosa = new Models.TbBanhoTosa(); tbBanhoTosa.DsBanho = request.Banho; tbBanhoTosa.DsDentes = request.Dentes; tbBanhoTosa.DsLocal = request.Local; tbBanhoTosa.DsObservacoes = request.Observacoes; tbBanhoTosa.DsTosa = request.Tosa; tbBanhoTosa.DsUnhas = request.Unhas; tbBanhoTosa.DtBanhoTosa = request.Data; tbBanhoTosa.IdCliente = request.IdCliente; tbBanhoTosa.IdPet = request.IdPet; ctx.Add(tbBanhoTosa); ctx.SaveChanges(); BackEnd.Controllers.Response.BanhoTosaResponse response = new BackEnd.Controllers.Response.BanhoTosaResponse(); response.Banho = request.Banho; response.Dentes = request.Dentes; response.Local = request.Local; response.Observacoes = request.Observacoes; response.Tosa = request.Tosa; response.Unhas = request.Unhas; response.Data = request.Data; response.IdCliente = request.IdCliente; response.IdPet = request.IdPet; return(response); }
public BackEnd.Controllers.Response.HotelResponse AgendarHotel(BackEnd.Controllers.Request.HotelRequest request) { Models.TbHotel tbHotel = new Models.TbHotel(); tbHotel.IdCliente = request.IdCliente; tbHotel.IdPet = request.IdPet; tbHotel.DsDelivery = request.Delivery; tbHotel.DsLocal = request.Local; tbHotel.DtEntrada = request.DataEntrada; tbHotel.DtSaida = request.DataSaida; ctx.Add(tbHotel); ctx.SaveChanges(); BackEnd.Controllers.Response.HotelResponse response = new BackEnd.Controllers.Response.HotelResponse(); response.IdCliente = request.IdCliente; response.IdPet = request.IdPet; response.Delivery = request.Delivery; response.Local = request.Local; response.DataEntrada = request.DataEntrada; response.DataSaida = request.DataSaida; return(response); }