private ObservableCollection <ItemStatusModel> GetStatuss() { ObservableCollection <ItemStatusModel> ItemStatusAux = new ObservableCollection <ItemStatusModel>(); try { ItemStatusDataMapper dataMapper = new ItemStatusDataMapper(); List <ITEM_STATUS> ii = new List <ITEM_STATUS>(); ii = (List <ITEM_STATUS>)dataMapper.getElements(); foreach (ITEM_STATUS i in ii) { ItemStatusModel ism = new ItemStatusModel(new ItemStatusDataMapper()); ism.ItemStatusName = i.ITEM_STATUS_NAME; ism.UnidItemStatus = i.UNID_ITEM_STATUS; ItemStatusAux.Add(ism); } } catch (Exception ex) { } return(ItemStatusAux); }
public ItemStatusModel(IDataMapper dataMapper) { if ((dataMapper as ItemStatusDataMapper) != null) { this._dataMapper = dataMapper as ItemStatusDataMapper; } }
public ItemStatusModel(IDataMapper dataMapper, USUARIO u) { if ((dataMapper as ItemStatusDataMapper) != null) { this._dataMapper = dataMapper as ItemStatusDataMapper; } this.ActualUser = u; }
public void GetJsonItemStatusTest() { ItemStatusDataMapper target = new ItemStatusDataMapper(); // TODO: Inicializar en un valor adecuado string expected = string.Empty; // TODO: Inicializar en un valor adecuado string actual; actual = target.GetJsonItemStatus(); Assert.AreEqual(expected, actual); Assert.Inconclusive("Compruebe la exactitud de este método de prueba."); }
public void getElementsTest() { ItemStatusDataMapper target = new ItemStatusDataMapper(); // TODO: Inicializar en un valor adecuado //object expected = null; // TODO: Inicializar en un valor adecuado object actual; actual = target.getElements(); Assert.AreEqual(5, ((FixupCollection <ITEM_STATUS>)actual).Count); //Assert.AreEqual(3,((List<ITEM_STATUS>)actual).Count); //Assert.Inconclusive("Compruebe la exactitud de este método de prueba."); }
public CatalogItemStatusViewModel() { try { IDataMapper dataMapper = new ItemStatusDataMapper(); this._catalogItemStatusModel = new CatalogItemStatusModel(dataMapper); } catch (ArgumentException a) { ; } catch (Exception ex) { throw ex; } }
public void getElementTest() { ITEM_STATUS item = new ITEM_STATUS() { ITEM_STATUS_NAME = "RECHAZADO", UNID_ITEM_STATUS = 87623567645 }; ItemStatusDataMapper target = new ItemStatusDataMapper(); // TODO: Inicializar en un valor adecuado object element = (object)item; // TODO: Inicializar en un valor adecuado //object expected = 1; // TODO: Inicializar en un valor adecuado object actual; actual = target.getElement(element); Assert.AreEqual(1, ((List <ITEM_STATUS>)actual).Count); Assert.AreEqual(item.UNID_ITEM_STATUS, ((List <ITEM_STATUS>)actual)[0].UNID_ITEM_STATUS); Assert.AreEqual(item.ITEM_STATUS_NAME, ((List <ITEM_STATUS>)actual)[0].ITEM_STATUS_NAME); }
public string downloadItemStatus(long?lastModifiedDate) { string respuesta = null; if (lastModifiedDate != null) { ItemStatusDataMapper dataMapper = new ItemStatusDataMapper(); respuesta = dataMapper.GetJsonItemStatus(lastModifiedDate); if (String.IsNullOrEmpty(respuesta)) { respuesta = null; } } return(respuesta); }
public EntradaPorValidacionViewModel(InventoryApp.ViewModel.GridMovimientos.MovimientoGridEntradasViewModel grid) { try { IDataMapper dataMapper = new SolicitanteDataMapper(); IDataMapper dataMapper2 = new AlmacenDataMapper(); IDataMapper dataMapper3 = new ProveedorDataMapper(); IDataMapper dataMapper4 = new ClienteDataMapper(); IDataMapper datamapper5 = new EmpresaDataMapper(); IDataMapper datamapper9 = new InfraestructuraDataMapper(); IDataMapper dataMapper10 = new ItemStatusDataMapper(); this._catalogInfraestructuraModel = new CatalogInfraestructuraModel(datamapper9); this._catalogEmpresaModel = new CatalogEmpresaModel(datamapper5); this._movimentoGridEntradas = grid; this._catalogSolicitanteModel = new CatalogSolicitanteModel(dataMapper); this._movimientoModel = new MovimientoModel(new MovimientoDataMapper()); TIPO_MOVIMIENTO mov = new TIPO_MOVIMIENTO(); mov.UNID_TIPO_MOVIMIENTO = 1; this._movimientoModel.TipoMovimiento = mov; this._itemModel = new CatalogItemModel(new ItemDataMapper()); this._catalogAlmacenModel = new CatalogAlmacenModel(dataMapper2); //Asignaciones especiales para los combos this._movimientoModel.Empresa = _catalogEmpresaModel.Empresa[0]; this._movimientoModel.Solicitante = _catalogSolicitanteModel.Solicitante[0]; this._movimientoModel.AlmacenDestino = _catalogAlmacenModel.Almacen[0]; this._movimientoModel.Tecnico = _movimientoModel.Tecnicos[0]; this._movimientoModel.Infraestructura = _catalogInfraestructuraModel.Infraestructuras[0]; this._movimientoModel.ActualUser = grid.ActualUser; this._IsEnabled = true; } catch (ArgumentException a) { ; } catch (Exception ex) { throw ex; } }
public ItemModel(ITEM item, int lectura, ITEM_STATUS status) { this._dataMapper2 = new ItemStatusDataMapper(); this._articulo = item.ARTICULO; this._nombre = item.ARTICULO.ARTICULO1; this._unidItem = item.UNID_ITEM; this._sku = item.SKU; this.SKU = item.SKU; this.NUMERO_SERIE = item.NUMERO_SERIE; this._numeroSerie = item.NUMERO_SERIE; this._cantidadMovimiento = lectura; object itemStatusLectura = this._dataMapper2.getElement(status); if (itemStatusLectura != null) { this._itemStatus = itemStatusLectura as ITEM_STATUS; this._itemStatuss = new ItemStatusModel(null) { ItemStatusName = this._itemStatus.ITEM_STATUS_NAME, UnidItemStatus = this._itemStatus.UNID_ITEM_STATUS }; } this.UNID_ITEM_STATUS = item.UNID_ITEM_STATUS; this.COSTO_UNITARIO = item.COSTO_UNITARIO; this._pedimentoExpo = item.PEDIMENTO_EXPO; this._pedimentoImpo = item.PEDIMENTO_IMPO; this.IS_ACTIVE = item.IS_ACTIVE; this.IsChecked = false; this._equipo = item.ARTICULO.EQUIPO; this._categoria = item.ARTICULO.CATEGORIA; this._marca = item.ARTICULO.MARCA; this._modelo = item.ARTICULO.MODELO; this.Detalles = new ObservableCollection <DeleteFacturaDetalleModel>(); this._dataMapper = new ItemDataMapper(); }
public void insertElementTest() { ITEM_STATUS item = new ITEM_STATUS() { ITEM_STATUS_NAME = "borrado insert " }; ItemStatusDataMapper target = new ItemStatusDataMapper(); // TODO: Inicializar en un valor adecuado object element = (object)item; // TODO: Inicializar en un valor adecuado target.insertElement(element); var entity = new TAE2Entities(); ITEM_STATUS EEst = (ITEM_STATUS)element; var query = (from cust in entity.ITEM_STATUS where cust.ITEM_STATUS_NAME == EEst.ITEM_STATUS_NAME select cust).ToList(); object actual = (object)query; Assert.AreEqual(item.ITEM_STATUS_NAME, ((List <ITEM_STATUS>)actual)[0].ITEM_STATUS_NAME); }
public ItemModel() { this._dataMapper = new ItemDataMapper(); this._dataMapper2 = new ItemStatusDataMapper(); this.Detalles = new ObservableCollection <DeleteFacturaDetalleModel>(); }