private void Save_Clicked(object sender, RoutedEventArgs e) { if (txtRate.Text.Length == 0) { showMessageBoxAsync(); return; } DBEngine.AddCurrencyRating(txtCurrency.Text, txtDate.Date.Value.DateTime.ToString("yyyy-MM-dd"), txtRate.Text); m_parent.Hide(); }