public CuentaContableController()
 {
     service              = service ?? new CuentaContableService();
     empresaService       = empresaService ?? new EmpresaService();
     areaOperativaService = areaOperativaService ?? new AreaOperativaService();
     reportExcelService   = reportExcelService ?? new ReporterService();
     eventoService        = new EventosService();
 }
 public PartidasService(Partidas ao, ICentroCostoService centroCostoSvc,
                        IEmpresaService empresaSvc,
                        IConceptoCostoService conceptoCostoSvc,
                        ICuentaContableService contableSvc, IMonedaService modSvc)
     : base(ao)
 {
     centroCostoService   = centroCostoSvc;
     empresaService       = empresaSvc;
     conceptoCostoService = conceptoCostoSvc;
     contableService      = contableSvc;
     monedaService        = modSvc;
 }
 public ReportePartidasAprController()
 {
     partAprSrv = partAprSrv ?? new ReportePartidasAprService();
     //  reportExcelService = reportExcelService ?? new ReporterService();
     catalagoService    = new CatalogoService();
     serviceComprobante = new ComprobanteService();
     usuarioAreaService = usuarioAreaService ?? new UsuarioAreaService();
     usuarioService     = usuarioService ?? new UserService();
     partApConcSrv      = partApConcSrv ?? new ReportePartidasAprConciliablesService();
     parService         = parService ?? new ParametroService();
     Ctaservice         = Ctaservice ?? new CuentaContableService();
 }
Example #4
0
        public ReporteSaldoContableController(ISaldoContableService rep, IReporterService repexcel, IUsuarioAreaService userArea, IAreaOperativaService area, IUserService usuario,
                                              IUsuarioEmpresaService objUsuarioAreaService, ISaldoContableServ saldoServs, IEmpresaService EmpServs, ICuentaContableService CCSrvs)
        {
            reportService      = rep;
            reportExcelService = repexcel;
            usuarioAreaService = userArea;

            usuarioSerive        = usuario;
            areaOperativaService = area;

            usuarioEmpresaService = objUsuarioAreaService;
            saldoServ             = saldoServs;
            EmpServ   = EmpServs;
            CCService = CCSrvs;
        }
Example #5
0
 public FileController()
 {
     //registroService = registroService ?? new RegistroControlService();
     partService          = partService ?? new PartidasService();
     centService          = centService ?? new CentroCostoService();
     empService           = empService ?? new EmpresaService();
     ctaService           = ctaService ?? new CuentaContableService();
     cncService           = cncService ?? new ConceptoCostoService();
     registroService      = registroService ?? new RegistroControlService();
     monedaSrv            = monedaSrv ?? new MonedaService();
     areaOperativaService = areaOperativaService ?? new AreaOperativaService();
     paramService         = paramService ?? new ParametroService();
     paramEmpresaAreaCentroCostoService = paramEmpresaAreaCentroCostoService ?? new EmpresaAreasCentroCostoService();
     paramEmpresaCentro = paramEmpresaCentro ?? new EmpresaCentroService();
     fileService        = fileService ?? new FilesProvider(partService, centService, empService, cncService, ctaService, monedaSrv, areaOperativaService, paramService, paramEmpresaAreaCentroCostoService, paramEmpresaCentro);
 }
Example #6
0
 public RegistroControlService(RegistroControl ao)
     : base(ao)
 {
     registroControl           = ao;
     fileProvider              = fileProvider ?? new FilesProvider();
     partidaService            = partidaService ?? new PartidasService();
     ctaService                = ctaService ?? new CuentaContableService();
     centroCostoService        = centroCostoService ?? new CentroCostoService();
     empresaService            = empresaService ?? new EmpresaService();
     conceptoCostoService      = conceptoCostoService ?? new ConceptoCostoService();
     monedaService             = monedaService ?? new MonedaService();
     paramService              = paramService ?? new ParametroService();
     areaOperativaService      = areaOperativaService ?? new AreaOperativaService();
     empresaAreaCentroCostoSrv = empresaAreaCentroCostoSrv ?? new EmpresaAreasCentroCostoService();
     empresaCentroSrv          = empresaCentroSrv ?? new EmpresaCentroService();
     empresaUsuarioService     = empresaUsuarioService ?? new UsuarioEmpresaService();
 }
Example #7
0
 public RegistroControlService(RegistroControl ao, IFilesProvider provider, IPartidasService partSvc, ICuentaContableService ctaSvc, ICentroCostoService centroCosSvc, IEmpresaService empSvc,
                               IConceptoCostoService cocosSvc)
     : base(ao)
 {
     registroControl           = ao ?? new RegistroControl();
     fileProvider              = provider ?? new FilesProvider();
     partidaService            = partSvc ?? new PartidasService();
     ctaService                = ctaSvc ?? new CuentaContableService();
     centroCostoService        = centroCosSvc ?? new CentroCostoService();
     empresaService            = empSvc ?? new EmpresaService();
     conceptoCostoService      = cocosSvc ?? new ConceptoCostoService();
     monedaService             = monedaService ?? new MonedaService();
     paramService              = paramService ?? new ParametroService();
     areaOperativaService      = areaOperativaService ?? new AreaOperativaService();
     empresaAreaCentroCostoSrv = empresaAreaCentroCostoSrv ?? new EmpresaAreasCentroCostoService();
     empresaCentroSrv          = empresaCentroSrv ?? new EmpresaCentroService();
     empresaUsuarioService     = empresaUsuarioService ?? new UsuarioEmpresaService();
 }
        public PartidasModel CreateSinglePartida(PartidasModel par)
        {
            centroCostoService   = centroCostoService ?? new CentroCostoService();
            partidaService       = partidaService ?? new PartidasService();
            conceptoCostoService = conceptoCostoService ?? new ConceptoCostoService();
            contableService      = contableService ?? new CuentaContableService();
            empresaService       = empresaService ?? new EmpresaService();
            monedaService        = monedaService ?? new  MonedaService();

            IFormatProvider culture    = new CultureInfo("en-US", true);
            string          dateFormat = "MMddyyyy";
            //Counting number of record already exist.
            var counterRecords = partidaService.Count();

            var centroCostos   = centroCostoService.GetAll();
            var conceptoCostos = conceptoCostoService.GetAll();
            var cuentas        = contableService.GetAll();
            var empresa        = empresaService.GetAll();

            var context           = new System.ComponentModel.DataAnnotations.ValidationContext(par, serviceProvider: null, items: null);
            var validationResults = new List <ValidationResult>();

            bool           isValid = Validator.TryValidateObject(par, context, validationResults, true);
            ValidationList rules   = new ValidationList();

            rules.Add(new FTSFOValidation(par, null));
            rules.Add(new FTFCIFOValidation(par, null));
            rules.Add(new COValidation(par, cuentas));
            rules.Add(new CEValidation(par, empresa));
            rules.Add(new CONCEPCOSValidation(par, conceptoCostos));
            rules.Add(new IImporteValidation(par, null));
            if (!rules.IsValid)
            {
                throw new Exception("No se cumple con la entrada de datos y las reglas de negocios");
            }
            par.PA_STATUS_PARTIDA = Convert.ToInt16(BusinessEnumerations.EstatusCarga.POR_APROBAR);
            par.PA_REFERENCIA     = System.DateTime.Now.Date.ToString(dateFormat) + counterRecords;
            return(base.Insert(par, true));
        }