Esempio 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);
            }
        }
        public void insertElementTest()
        {
            ArticuloDataMapper target  = new ArticuloDataMapper(); // TODO: Inicializar en un valor adecuado
            object             element = null;                     // TODO: Inicializar en un valor adecuado
            ARTICULO           modelo  = new ARTICULO();

            modelo.ARTICULO1      = "Tableta";
            modelo.UNID_CATEGORIA = 20121106130238876;
            modelo.UNID_EQUIPO    = 2012110512571408;
            modelo.UNID_MARCA     = 20121105123017071;
            modelo.UNID_MODELO    = 20121106125528552;
            target.insertElement(modelo);
            element = target.getElements();
            Assert.Inconclusive("Un método que no devuelve ningún valor no se puede comprobar.");
        }