Esempio n. 1
0
        public Boolean ValidarCabeceraPlanillaArrastre(Int32 PlanillaArrastreID, Int32 ServicioTransporteID, Int32 PlanillaNumero)
        {
            Entidades.PlanillaArrastre   _planilla;
            IPlanillaArrastreRepositorio repositorioPlanilla = IoC.GetObjectRepositorio <IPlanillaArrastreRepositorio>();

            //_planilla = repositorioPlanilla.GetOne(p => p.PlanillaArrastreID != PlanillaArrastreID && p.ServicioTransporteID == ServicioTransporteID && (p.Baja ?? false) == false);
            //if (_planilla != null)
            //{
            //    throw new DatosInvalidosException("Ya hay una planilla de arrastre con el servicio ingresado");
            //}

            _planilla = repositorioPlanilla.GetOne(p => p.PlanillaArrastreID != PlanillaArrastreID && p.PlanillaNumero == PlanillaNumero && (p.Baja ?? false) == false);
            if (_planilla != null)
            {
                throw new DatosInvalidosException("Ya hay una planilla de arrastre con el número ingresado");
            }

            return(true);
        }
Esempio n. 2
0
        public PlanillaArrastre GetOne(Int32 PlanillaArrastreID)
        {
            IPlanillaArrastreRepositorio _repositorio = IoC.GetObjectRepositorio <IPlanillaArrastreRepositorio>();

            return(_repositorio.GetOne(a => a.PlanillaArrastreID == PlanillaArrastreID, new String[] { "PlanillaArrastreChofers", "PlanillaArrastreChofers.Chofer", "PlanillaArrastreChofers.Chofer1", "PlanillaArrastreHojaRutas", "PlanillaArrastreHojaRutaNoRecibidas.HojaRuta" }));
        }