/// <summary> /// Add new active order to collection converting from LaborDetail.ListItem /// </summary> private void AddActiveOrder(LaborDetail.ListItem order) { var item = _orderRepository.ConvertToWorkModel(order); if (item != null) { ActiveDataCollection.Add(item); UpdateDisplayDataCollection(); } }
/// <summary> /// Remove active order from collection by Id /// </summary> private void RemoveActiveOrder(int orderId) { if (ActiveDataCollection != null && ActiveDataCollection.Count > 0) { var items = ActiveDataCollection.Where(x => x.MasterNumber == orderId).ToList(); if (items != null) { foreach (var i in items) { ActiveDataCollection.Remove(i); } UpdateDisplayDataCollection(); } } }