private void btnAgents_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         wpfAgent frm = new wpfAgent();
         frm.UserID = UserID;
         frm.status = true;
         frm.ShowDialog();
     }
     catch (Exception ex)
     {
         System.Windows.MessageBox.Show("Runtime Error: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         return;
     }
 }
 private void itm5_MouseUp(object sender, MouseButtonEventArgs e)
 {
     try
     {
         wpfAgent frm = new wpfAgent();
         frm.ShowDialog();
     }
     catch (Exception ex)
     {
         System.Windows.MessageBox.Show("Runtime Error: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         return;
     }
 }