示例#1
0
 public AreaCentroCostoController()
 {
     service = service ?? new AreaCentroCostoService();
     empresaCentroService = empresaCentroService ?? new EmpresaCentroService();
     empresaService       = empresaService ?? new EmpresaService();
     centroCostoService   = centroCostoService ?? new CentroCostoService();
 }
示例#2
0
 public ConfiguracionEditor(IConfiguracionView view)
 {
     this.mView = view;
     this.mConfiguracionService = ConfiguracionService.Instance;
     this.mCentroCostoService   = CentroCostoService.Instance;
     this.mPersonaService       = PersonaService.Instance;
     this.Initialize();
 }
示例#3
0
 public ConceptoEditor(IConceptoView view)
 {
     this.mView               = view;
     this.mConceptoService    = ConceptoService.Instance;
     this.mCentroCostoService = CentroCostoService.Instance;
     this.mPersonaService     = PersonaService.Instance;
     this.Initialize();
 }
示例#4
0
 public AreaEditor(IAreaView view)
 {
     this.mView               = view;
     this.mAreaService        = AreaService.Instance;
     this.mCentroCostoService = CentroCostoService.Instance;
     this.mPersonaService     = PersonaService.Instance;
     this.Initialize();
 }
示例#5
0
 public NovedadEditor(INovedadView view)
 {
     this.mView               = view;
     this.mNovedadService     = NovedadService.Instance;
     this.mCentroCostoService = CentroCostoService.Instance;
     this.mPersonaService     = PersonaService.Instance;
     this.Initialize();
 }
示例#6
0
 public PersonaEditor(IPersonaView view)
 {
     this.mView                    = view;
     this.mPersonaService          = PersonaService.Instance;
     this.mDocumentoPersonaService = DocumentoPersonaService.Instance;
     this.mCentroCostoService      = CentroCostoService.Instance;
     this.Initialize();
 }
示例#7
0
 public AreaOperativaController()
 {
     areaOperativaService      = areaOperativaService ?? new AreaOperativaService();
     catalagoService           = new CatalogoService();
     usuarioAreaService        = new UsuarioAreaService();
     areaCentroCostoService    = new AreaCentroCostoService();
     empresaService            = empresaService ?? new EmpresaService();
     centroCostoService        = centroCostoService ?? new CentroCostoService();
     empresaCentroCostoService = empresaCentroCostoService ?? new EmpresaCentroService();
 }
示例#8
0
 public ImportarEditor(IImportarView view)
 {
     this.mView               = view;
     this.mImportarService    = ImportarService.Instance;
     this.mActividadService   = ActividadService.Instance;
     this.mCentroCostoService = CentroCostoService.Instance;
     this.mConceptoService    = ConceptoService.Instance;
     this.mPersonaService     = PersonaService.Instance;
     this.mSucursalService    = SucursalService.Instance;
     this.Initialize();
 }
 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;
 }
示例#10
0
 public PlanillaEditor(IPlanillaView view)
 {
     this.mView                   = view;
     this.mPlanillaService        = PlanillaService.Instance;
     this.mAreaService            = AreaService.Instance;
     this.mSucursalService        = SucursalService.Instance;
     this.mPersonaService         = PersonaService.Instance;
     this.mOrdenProduccionService = OrdenProduccionService.Instance;
     this.mActividadService       = ActividadService.Instance;
     this.mCentroCostoService     = CentroCostoService.Instance;
     this.mNovedadService         = NovedadService.Instance;
     this.mConfiguracionService   = ConfiguracionService.Instance;
     this.mNumeracionService      = NumeracionService.Instance;
     this.Initialize();
 }
示例#11
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);
 }
示例#12
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();
 }
示例#13
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));
        }
示例#15
0
        ///public CentroCostoController()
        //{
        //    service = service ?? new CentroCostoService();
        //}

        public CentroCostoController(ICentroCostoService svc)
        {
            service = svc;
        }
 public CentroCostoController(ICentroCostoService CentroCostoService)
 {
     _CentroCostoService = CentroCostoService;
 }
 public EmpresaCentroController()
 {
     service            = service ?? new EmpresaCentroService();
     centroCostoService = centroCostoService ?? new CentroCostoService();
 }
示例#18
0
 public CentroCostoEditor(ICentroCostoView view)
 {
     this.mView = view;
     this.mCentroCostoService = CentroCostoService.Instance;
     this.Initialize();
 }