Esempio n. 1
0
        private async void FillInputValues()
        {
            var fixture = await FixtureService.GetById(_selectedFixtureId);

            txtName.Text        = fixture.Name;
            txtDescription.Text = fixture.Description;
            txtPrice.Text       = fixture.Price.ToString();
            dtpPurchase.Value   = fixture.DatePurchase.Date;
            dtpWarranty.Value   = fixture.DateWarranty.Date;

            var selectedSupplier = _suppliers.Find(s => s.Id == fixture.SupplierId);
            var selectedCategory = _categories.Find(c => c.Id == fixture.CategoryId);

            cmbSupplier.SelectedItem = new { Display = selectedSupplier.Name, Value = selectedSupplier.Id };
            cmbCategory.SelectedItem = new { Display = selectedCategory.Name, Value = selectedCategory.Id };
        }