Example #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);
            }
        }
Example #2
0
 public MarcaModel(IDataMapper dataMapper, USUARIO u)
 {
     if ((dataMapper as MarcaDataMapper) != null)
     {
         this._dataMapper = dataMapper as MarcaDataMapper;
     }
     this.ActualUser = u;
 }
        public void GetJsonMarcaTest()
        {
            MarcaDataMapper target   = new MarcaDataMapper(); // TODO: Inicializar en un valor adecuado
            string          expected = string.Empty;          // TODO: Inicializar en un valor adecuado
            string          actual;

            actual = target.GetJsonMarca();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Compruebe la exactitud de este método de prueba.");
        }
        public void insertElementTest()
        {
            MarcaDataMapper target  = new MarcaDataMapper(); // TODO: Inicializar en un valor adecuado
            object          element = null;                  // TODO: Inicializar en un valor adecuado
            MARCA           marca   = new MARCA();

            marca.MARCA_NAME = "Apple";
            target.insertElement(marca);
            element = target.getElements();
            Assert.Inconclusive("Un método que no devuelve ningún valor no se puede comprobar.");
        }
Example #5
0
 public CatalogMarcaViewModel()
 {
     try
     {
         IDataMapper dataMapper = new MarcaDataMapper();
         this._catalogMarcaModel = new CatalogMarcaModel(dataMapper);
     }
     catch (ArgumentException a)
     {
         ;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #6
0
        public string downloadMarca(long?lastModifiedDate)
        {
            string respuesta = null;

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

                respuesta = dataMapper.GetJsonMarca(lastModifiedDate);

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