public PersonalChatTabControl(IDKin.IM.Core.Staff staff)
 {
     if (staff != null)
     {
         this.InitializeComponent();
         this.staff = staff;
         this.userHead.ImageSource = staff.HeaderImage42;
         this.tbkName.Text = staff.Name;
         this.tbkID.Text = "(" + staff.Uid + ")";
         this.tbkSignature.Text = staff.Signature;
         this.tbkToolTip.Text = staff.Signature;
         this.ChatComponent.InitData(staff);
         this.ChatComponent.btnGroupShield.Visibility = Visibility.Collapsed;
         this.ChatComponent.PanelChangeContent.Children.Add(this.FileList);
         this.ChatComponent.PanelChangeContent.Children.Add(this.IShowPanel);
         this.ChatComponent.MsgRecordStatus = new ChatComponent.MsgRecordStatusDelegate(this.MsgRecordStatusHandle);
         this.ChatComponent.viewMsgBox.PreviewDragEnter += new System.Windows.DragEventHandler(this.TextBox_PreviewDragEnter);
         this.ChatComponent.viewMsgBox.PreviewDragOver += new System.Windows.DragEventHandler(this.TextBox_PreviewDragEnter);
         this.ChatComponent.viewMsgBox.PreviewDrop += new System.Windows.DragEventHandler(this.UserControl_Drop);
         this.ChatComponent.inputMsgBox.PreviewDragEnter += new System.Windows.DragEventHandler(this.TextBox_PreviewDragEnter);
         this.ChatComponent.inputMsgBox.PreviewDragOver += new System.Windows.DragEventHandler(this.TextBox_PreviewDragEnter);
         this.ChatComponent.inputMsgBox.PreviewDrop += new System.Windows.DragEventHandler(this.UserControl_Drop);
         this.ShowIShowPanel();
         this.userProfileFrame.NavigationService.Navigate(this.profilePage);
         this.OACurrentWork.crwDocumentManagement.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.DOCUMENT_MANAGEMENT, this.staff, this.OACurrentWork.crwDocumentManagement);
         this.OACurrentWork.crwInsideDiscussion.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.INSIDE_DISCUSSION, this.staff, this.OACurrentWork.crwInsideDiscussion);
         this.OACurrentWork.crwInsideNotice.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.INSIDE_NOTICE, this.staff, this.OACurrentWork.crwInsideNotice);
         this.OACurrentWork.crwProjectManagement.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.PROJECT_MANAGEMENT, this.staff, this.OACurrentWork.crwProjectManagement);
         this.OACurrentWork.crwSystemManagement.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.SYSTEM_MANAGEMENT, this.staff, this.OACurrentWork.crwSystemManagement);
         this.OACurrentWork.crwWorkCooperation.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.WORK_COOPERATION, this.staff, this.OACurrentWork.crwWorkCooperation);
         this.OACurrentWork.crwWorkPlan.AllBaseDynamicWorkObjViewModel = new AllBaseDynamicWorkObjViewModel(DynamicWorkModuleType.WORK_PLAN, this.staff, this.OACurrentWork.crwWorkPlan);
     }
 }
 public MarkedRecordItem(IDKin.IM.Core.Staff staff)
 {
     this.InitializeComponent();
     this.InitData();
     this.InitServic();
     this.imgHead.Source = staff.HeaderImageOnline;
     this.tbkName.Text = staff.Name;
     this.tbkDate.Text = staff.CreateTime;
     this.tbkID.Text = staff.Uid.ToString();
     this.st = staff;
 }
Пример #3
0
 private void StaffListEventHandle(System.Collections.ObjectModel.Collection<IDKin.IM.Protocol.Enterprise.Staff> list)
 {
     if (list != null && list.Count > 0)
     {
         IDKin.IM.Core.Staff staff = null;
         foreach (IDKin.IM.Protocol.Enterprise.Staff s in list)
         {
             staff = new IDKin.IM.Core.Staff();
             staff.DepartmentId = s.department_id;
             staff.Jid = s.jid;
             staff.Name = s.name;
             if (string.IsNullOrEmpty(staff.Name))
             {
                 this.logger.Debug("获取用户列表时,员工名字为空,请及时通知IDKin团队 " + staff.Uid);
             }
             staff.Signature = s.signature;
             staff.Status = (UserStatus)System.Enum.Parse(typeof(UserStatus), s.status.ToString());
             staff.Uid = s.uid;
             staff.UserName = s.username;
             staff.HeaderFileName = s.img;
             staff.Sex = (Sex)System.Enum.Parse(typeof(Sex), s.sex.ToString());
             staff.Telephone = s.telephone;
             staff.Mobile = s.mobile;
             staff.Email = s.email;
             staff.Extension = s.extension;
             staff.ShowScope = s.showScope;
             staff.InfoUpdate = new StaffInfoUpdate(this.StaffInfoUpdate);
             this.imageService.SetHeaderImage(staff);
             this.imageService.SetStatusIcon(staff);
             this.imageService.SetHeaderImageOnline(staff);
             if (this.dataService.GetDepartment(staff.DepartmentId) != null)
             {
                 this.dataService.AddStaff(staff);
             }
             this.Employee.DepartmentTree.AddStaff(staff);
             this.fileService.DownloadHeader(staff);
             if (staff.DepartmentId == this.sessionService.DepartmentId)
             {
                 this.Employee.SelfDepartmentItem.AddStaff(staff);
                 this.AddSelfDepartmentJobsLogo(staff);
             }
         }
         this.Employee.DepartmentTree.SortAllDepartment();
         this.Employee.SelfDepartmentItem.SortAllDepartment();
         this.Employee.UpdateDepartmentStaffCount(this.dataService.GetEntStaffOnlineCount(), this.dataService.GetEntStaffTotalCount());
         if (staff != null)
         {
             this.AddJobsLogo(staff.DepartmentId);
         }
     }
 }
 private bool StaffInfo(GetIsMark mark)
 {
     IDKin.IM.Core.Staff staff = this.dataService.GetStaff(mark.id);
     bool result;
     if (staff != null && mark.id != this.sessionService.Uid)
     {
         this.imgHead.Source = staff.HeaderImageOnline;
         this.tbkName.Text = staff.Name;
         this.tbkDate.Text = mark.updateTime;
         this.tbkID.Text = staff.Uid.ToString();
         this.st = staff;
         result = true;
     }
     else
     {
         result = false;
     }
     return result;
 }