コード例 #1
0
        public Insurrance GetInsurrance(int id)
        {
            InsurranceLogic.EFDataBaseConecction.Insurrance insurranceDBO = DataAccessFacade.Instance.GetInsurrance(id);
            IAdapter adapter = AdapterCreatorImpl.getInstance().getAdapter("Insurrance");

            return((Insurrance)adapter.adapt(insurranceDBO));
        }
コード例 #2
0
        public Insurrance AddInsurrance(string Nombre, string descripcion,
                                        DateTime inicioVigenciaPoliza, float cobertura, int periodoCobertura, decimal precioPoliza, int tipoRiesgo,
                                        TiposCubrimiento TiposCubrimiento)
        {
            IAdapter adapter = AdapterCreatorImpl.getInstance().getAdapter("TiposCubrimiento");

            InsurranceLogic.EFDataBaseConecction.Insurrance insurranceDBO = DataAccessFacade.Instance.AddInsurrance(
                Nombre, descripcion, TiposCubrimiento.id, inicioVigenciaPoliza, cobertura, periodoCobertura, precioPoliza,
                tipoRiesgo);
            adapter = AdapterCreatorImpl.getInstance().getAdapter("Insurrance");
            return((Insurrance)adapter.adapt(insurranceDBO));
        }
コード例 #3
0
 public DTO adapt(DBO dbo)
 {
     InsurranceLogic.EFDataBaseConecction.Insurrance insurranceDBO = (InsurranceLogic.EFDataBaseConecction.Insurrance)dbo;
     InsurranceLogic.Model.Insurrance insurranceDTO = new Insurrance();
     insurranceDTO.Nombre               = insurranceDBO.Nombre;
     insurranceDTO.descripcion          = insurranceDBO.descripcion;
     insurranceDTO.id                   = insurranceDBO.id;
     insurranceDTO.inicioVigenciaPoliza = insurranceDBO.inicioVigenciaPoliza;
     insurranceDTO.periodoCobertura     = insurranceDBO.periodoCobertura;
     insurranceDTO.cobertura            = insurranceDBO.cobertura;
     insurranceDTO.precioPoliza         = insurranceDBO.precioPoliza;
     insurranceDTO.tipoRiesgo           = insurranceDBO.tipoRiesgo;
     insurranceDTO.TiposCubrimiento     = new TiposCubrimiento();
     insurranceDTO.TiposCubrimiento.id  = insurranceDBO.idTipoCubrimiento;
     return(insurranceDTO);
 }