private void SaveButton_Click(object sender, RoutedEventArgs e) { if (ValidateAll()) { EventDBContext.IntitalizeDB(); EventDBContext.Inserst(EventDate.Text.ToString(), EventAdress.Text.ToString(), EventDetail.Text.ToString().Trim()); InitializeDataGrid(); ClearAll(); WindowSuccess success = new WindowSuccess(); success.SetContent("Event Saved Succefully"); success.Show(); } else { WindowError error = new WindowError(); error.SetContent("Empty Filed Or Invalid Input"); error.Show(); } }