private async void btnDodajMaterijal_Click(object sender, EventArgs e) { var dimensions = _dimensions.GetDimensions(); if (dimensions == null || !ValidateData()) { return; } var request = new MaterialInsertRequest { Width = dimensions.Sirina, Thickness = dimensions.Debljina, Diameter = dimensions.Precnik, Length = dimensions.Duzina, Quality = comboKvalitet.SelectedValue.ToString(), Quantity = int.Parse(txtKolicina.Text), Hardness = int.Parse(txtTvrdoca.Text), MaterialTypeId = (int)comboTipMaterijala.SelectedValue }; await _service.Insert <EToolService.Model.Models.Material>(request); MessageBox.Show("Materijal uspješno evidentiran", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); }