Пример #1
0
        public HttpResponseMessage EliminarPlanilla(tbplanilla entity)
        {
            try
            {
                //Se reinician valores de la planilla
                PlanillaBusiness biz = new PlanillaBusiness();
                biz.ReiniciarPlanilla(entity);

                //Se eliminan los resultados
                tbresultado resultado = new tbresultado()
                {
                    pla_id = entity.pla_id
                };
                ResultadoBusiness bizResultados = new ResultadoBusiness();
                bizResultados.Delete(resultado);

                //Se eliminan planilla cargo con los votos cargados
                tbplanillacargo planillaCargo = new tbplanillacargo()
                {
                    pla_id = entity.pla_id
                };
                PlanillaCargoBusiness bizPlanillaCargo = new PlanillaCargoBusiness();
                bizPlanillaCargo.Delete(planillaCargo);
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message));
            }
            return(Request.CreateResponse(HttpStatusCode.OK));
        }
Пример #2
0
 public void Delete(tbresultado entity)
 {
     resultadoRepository.Delete(entity);
 }