Ejemplo n.º 1
0
 public void SortPartsByCategory(string category)
 {
     GetParts();
     if (category != "" && category != "Show All")
     {
         int id = CategoryCollection.FirstOrDefault(c => c.Name == category).Id;
         PartsCollection = PartsCollection.Where(c => c.CatergoeryId == id).ToList();
     }
 }
Ejemplo n.º 2
0
        public void ViewBOM(string JobNumber)
        {
            ObservableBOMPartsCollection = new List <ObservableBOMPart>();
            GetParts();
            GetBOMParts();
            var jobNumberParts = BOMPartCollection.Where(j => j.JobNumber == JobNumber);

            foreach (var item in jobNumberParts)
            {
                var part = PartsCollection.Where(p => p.Id == item.PartId).FirstOrDefault();
                ObservableBOMPart bomPart = new ObservableBOMPart(item.PartId, part.Description, part.PartNumber, part.Supplier, part.PartNumber, part.Link, item.Quantity);
                //{
                //};
                //bomPart.Quantity = item.Quantity;
                ObservableBOMPartsCollection.Add(bomPart);
            }
            _exportViewBtnVisibility = true;
        }