Ejemplo n.º 1
0
        public DeleteOfertaResponse DeleteOferta(int ofertaId)
        {
            var response = new DeleteOfertaResponse();

            try
            {
                var oferta = _ofertaRepository.GetOne(x => x.OfertaId == ofertaId);

                oferta.IsActivo = false;

                if (_ofertaRepository.Update(oferta) > 0)
                {
                    response.IsValid = true;
                }
                else
                {
                    response.IsValid      = false;
                    response.ErrorMessage = "Error to delete Oferta";
                }
            }
            catch (Exception ex)
            {
                response.IsValid      = false;
                response.ErrorMessage = ex.Message;
            }

            return(response);
        }
Ejemplo n.º 2
0
        public DeleteOfertaResponse DeleteOferta(int ofertaId)
        {
            var response = new DeleteOfertaResponse()
            {
                IsValid = true
            };

            return(response);
        }