private void progressAddBtn_Click(object sender, EventArgs e) { double weight = 0; try { weight = Double.Parse(progressCurrentWeightTextBox.Text, CultureInfo.InvariantCulture); } catch (Exception) { MessageBox.Show("Vrijednost '" + progressCurrentWeightTextBox.Text + "' koju ste unijeli za tjelesnu masu nije odgovarajuća. Molimo Vas pokušajte ponovno."); return; } Progress progress = new Progress() { Weight = weight, Date = DateTime.Now, User = user, IsUsersProgress = true }; _progressController.AddProgress(progress); progressDatabase.Add(progress); AddRowToProgressTable(progress); RefreshChart(); progressCurrentWeightTextBox.Text = ""; }