/// <summary> /// Ejecuta la acción del command /// </summary> /// <param name="catalogItemStatusViewModel"></param> public ModifyArticuloViewModel(CatalogArticuloViewModel catalogArticuloViewModel, ArticuloModel selectedArticuloModel) { this._articulo = new ArticuloModel(new ArticuloDataMapper(), catalogArticuloViewModel.ActualUser); this._catalogArticuloViewModel = catalogArticuloViewModel; this._articulo.UnidArticulo = selectedArticuloModel.UnidArticulo; this._articulo.ArticuloName = selectedArticuloModel.ArticuloName; this._articulo.Categoria = selectedArticuloModel.Categoria; this._articulo.Equipo = selectedArticuloModel.Equipo; this._articulo.Marca = selectedArticuloModel.Marca; this._articulo.Modelo = selectedArticuloModel.Modelo; try { this._catalogCategoriaModel = new CatalogCategoriaModel(new CategoriaDataMapper()); this._catalogEquipoModel = new CatalogEquipoModel(new EquipoDataMapper()); this._catalogMarcaModel = new CatalogMarcaModel(new MarcaDataMapper()); this._catalogModeloModel = new CatalogModeloModel(new ModeloDataMapper()); } catch (ArgumentException ae) { ; } catch (Exception ex) { throw ex; } }
/// <summary> /// Ejecuta la acción del command /// </summary> /// <param name="catalogItemStatusViewModel"></param> public AddArticuloViewModel(CatalogArticuloViewModel catalogArticuloViewModel) { this._articulo = new ArticuloModel(new ArticuloDataMapper(), catalogArticuloViewModel.ActualUser); this._catalogArticuloViewModel = catalogArticuloViewModel; try { this._catalogCategoriaModel = new CatalogCategoriaModel(new CategoriaDataMapper()); this._catalogEquipoModel = new CatalogEquipoModel(new EquipoDataMapper()); this._catalogMarcaModel = new CatalogMarcaModel(new MarcaDataMapper()); this._catalogModeloModel = new CatalogModeloModel(new ModeloDataMapper()); } catch (ArgumentException ae) { ; } catch (Exception ex) { throw ex; } }