Exemplo n.º 1
0
        public void saveArticulo()
        {
            CategoriaDataMapper catDM = new CategoriaDataMapper();
            MarcaDataMapper     marDM = new MarcaDataMapper();
            ModeloDataMapper    modDM = new ModeloDataMapper();
            EquipoDataMapper    equDM = new EquipoDataMapper();

            catDM.insertElement(new CATEGORIA()
            {
                UNID_CATEGORIA = this._categoria.UNID_CATEGORIA, IS_MODIFIED = true, IS_ACTIVE = true, CATEGORIA_NAME = this._categoria.CATEGORIA_NAME
            }, this.ActualUser);
            marDM.insertElement(new MARCA()
            {
                UNID_MARCA = this._marca.UNID_MARCA, IS_ACTIVE = true, IS_MODIFIED = true, MARCA_NAME = this._marca.MARCA_NAME
            }, this.ActualUser);
            modDM.insertElement(new MODELO()
            {
                UNID_MODELO = this._modelo.UNID_MODELO, IS_ACTIVE = true, IS_MODIFIED = true, MODELO_NAME = this._modelo.MODELO_NAME
            }, this.ActualUser);
            equDM.insertElement(new EQUIPO()
            {
                UNID_EQUIPO = this._equipo.UNID_EQUIPO, IS_ACTIVE = true, IS_MODIFIED = true, EQUIPO_NAME = this._equipo.EQUIPO_NAME
            }, this.ActualUser);

            if (_dataMapper != null)
            {
                _dataMapper.insertElement(new ARTICULO()
                {
                    IS_ACTIVE = true, ARTICULO1 = this._articuloName, UNID_CATEGORIA = this._categoria.UNID_CATEGORIA, UNID_EQUIPO = this._equipo.UNID_EQUIPO, UNID_MODELO = this._modelo.UNID_MODELO, UNID_MARCA = this._marca.UNID_MARCA
                }, this.ActualUser);
            }
        }
Exemplo n.º 2
0
 public ModeloModel(IDataMapper dataMapper, USUARIO u)
 {
     if ((dataMapper as ModeloDataMapper) != null)
     {
         this._dataMapper = dataMapper as ModeloDataMapper;
     }
     this.ActualUser = u;
 }
Exemplo n.º 3
0
        public void GetJsonModeloTest()
        {
            ModeloDataMapper target   = new ModeloDataMapper(); // TODO: Inicializar en un valor adecuado
            string           expected = string.Empty;           // TODO: Inicializar en un valor adecuado
            string           actual;

            actual = target.GetJsonModelo();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Compruebe la exactitud de este método de prueba.");
        }
Exemplo n.º 4
0
        public void insertElementTest()
        {
            ModeloDataMapper target  = new ModeloDataMapper(); // TODO: Inicializar en un valor adecuado
            object           element = null;                   // TODO: Inicializar en un valor adecuado
            MODELO           modelo  = new MODELO();

            modelo.MODELO_NAME = "iPhone";
            target.insertElement(modelo);
            element = target.getElements();
            Assert.Inconclusive("Un método que no devuelve ningún valor no se puede comprobar.");
        }
 public CatalogModeloViewModel()
 {
     try
     {
         IDataMapper dataMapper = new ModeloDataMapper();
         this._catalogModeloModel = new CatalogModeloModel(dataMapper);
     }
     catch (ArgumentException a)
     {
         ;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 6
0
        public string downloadModelo(long?lastModifiedDate)
        {
            string respuesta = null;

            if (lastModifiedDate != null)
            {
                ModeloDataMapper dataMapper = new ModeloDataMapper();

                respuesta = dataMapper.GetJsonModelo(lastModifiedDate);

                if (String.IsNullOrEmpty(respuesta))
                {
                    respuesta = null;
                }
            }
            return(respuesta);
        }