Пример #1
0
        public PartsView(PartsAccordionView detail)
        {
            InitializeComponent();

            PartQty.Text          = detail.PartQty;
            PartNumber.Text       = detail.PartNumber;
            PartSupplierRef.Text  = detail.PartSupplierRef;
            PartDescription.Text  = detail.PartDescription;
            PartU.IsChecked       = detail.U;
            PartW.IsChecked       = detail.W;
            PartMaterialCost.Text = detail.PartMaterialCost;
            PartMatCharges.Text   = detail.PartMatCharges;
        }
Пример #2
0
        public void SetSectionParts(JobSheetObjectViewModel job)
        {
            AddMoreParts.Children.Clear();

            foreach (var child in job.MaterialsUsed)
            {
                var detail = new PartsAccordionView();


                detail.PartQty         = child.Quantity;
                detail.PartNumber      = child.PartNumber;
                detail.PartSupplierRef = child.SupplierReference;
                detail.PartDescription = child.DescriptionOfMaterials;
                detail.U = child.U;
                detail.W = child.W;
                detail.PartMaterialCost = child.MaterialCost;
                detail.PartMatCharges   = child.MaterialCharges;
                AddMoreParts.Children.Add(new PartsView(detail));
            }
        }