private void Submit_Click(object sender, RoutedEventArgs e) { if (CreateRequestPanel.IsVisible) { baseViewModel.CreateRequest(); MessageBox.Show("Your request has been submitted.\n Please check your mail-box for more details"); } if (SearchRequestPanel.IsVisible) { baseViewModel.SendMail("Follow-up on :" + this.checkStatus.RequestId.Text, this.checkStatus.Comment.Text); } if (PendinRequestPanel.IsVisible) { baseViewModel.AppoveRequests(); } GobackPanel.Visibility = PendinRequestPanel.Visibility = SearchRequestPanel.Visibility = CreateRequestPanel.Visibility = Visibility.Collapsed; }