示例#1
0
 private void btnSure_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         User user = new User();
         user.jid       = this.sessionService.Jid;
         user.uid       = this.sessionService.Uid;
         user.name      = this.sessionService.Name;
         user.nickname  = this.sessionService.NickName;
         user.signature = this.sessionService.Signature;
         user.status    = (int)this.sessionService.Status;
         user.username  = this.sessionService.UserName;
         this.viewModel.AddRosterRequest(this.sessionService.Uid, this.userId, this.jid, this.tbMessage.Text, user, 0L);
         RequestResultWindow result = new RequestResultWindow();
         result.resultVO        = new RequestResultVO();
         result.resultVO.Reason = Visibility.Collapsed;
         result.resultVO.IsSure = Visibility.Collapsed;
         result.DataContext     = result.resultVO;
         result.ShowDialog();
     }
     catch (System.Exception ex)
     {
         System.Console.WriteLine(ex.ToString());
     }
 }
 private void btnSure_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         User user = new User();
         user.jid = this.sessionService.Jid;
         user.uid = this.sessionService.Uid;
         user.name = this.sessionService.Name;
         user.nickname = this.sessionService.NickName;
         user.signature = this.sessionService.Signature;
         user.status = (int)this.sessionService.Status;
         user.username = this.sessionService.UserName;
         this.viewModel.AddRosterRequest(this.sessionService.Uid, this.userId, this.jid, this.tbMessage.Text, user, 0L);
         RequestResultWindow result = new RequestResultWindow();
         result.resultVO = new RequestResultVO();
         result.resultVO.Reason = Visibility.Collapsed;
         result.resultVO.IsSure = Visibility.Collapsed;
         result.DataContext = result.resultVO;
         result.ShowDialog();
     }
     catch (System.Exception ex)
     {
         System.Console.WriteLine(ex.ToString());
     }
 }