Beispiel #1
0
        private async Task UpdateFixture()
        {
            FixtureForUpdateDto fixtureForUpdateDto = new FixtureForUpdateDto()
            {
                Id           = _selectedFixtureId,
                CategoryId   = (cmbCategory.SelectedItem as dynamic).Value,
                DatePurchase = dtpPurchase.Value.Date,
                DateWarranty = dtpWarranty.Value.Date,
                Description  = txtDescription.Text,
                Name         = txtName.Text,
                PictureUrl   = "pic.lk", // TODO : picture link
                Price        = Convert.ToDecimal(txtPrice.Text),
                SupplierId   = (cmbSupplier.SelectedItem as dynamic).Value
            };

            await FixtureService.Update(fixtureForUpdateDto);

            MessageBox.Show(Messages.FixtureUpdated);
            await LoadFixtureList();
        }