Пример #1
0
 private void btnView_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         wpfAgentInfo frm = new wpfAgentInfo();
         frm.status = "View";
         frm.UserID = UserID;
         frm.aId = Convert.ToInt32(getRow(dgEmp, 0));
         frm.ShowDialog();
     }
     catch (Exception ex)
     {
         //System.Windows.MessageBox.Show("Runtime Error: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         return;
     }
 }
 private void Hyperlink_Click_1(object sender, RoutedEventArgs e)
 {
     try
     {
         wpfAgentInfo frm = new wpfAgentInfo();
         frm.status = "View";
         using (var ctx = new finalContext())
         {
             var lon = ctx.Loans.Find(lId);
             frm.aId = lon.AgentID;
         }
         frm.ShowDialog();
     }
     catch (Exception ex)
     {
         System.Windows.MessageBox.Show("Runtime Error: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         return;
     }
 }
Пример #3
0
 private void btnAdd_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         wpfAgentInfo frm = new wpfAgentInfo();
         frm.status = "Add";
         frm.UserID = UserID;
         frm.ShowDialog();
     }
     catch (Exception ex)
     {
         System.Windows.MessageBox.Show("Runtime Error: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         return;
     }
 }