Example #1
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);
                loadbar.Start();

                DictManager.OnDictionaryLoadCompleted += new EventHandler <OnDictionaryLoadArgs>(DictManager_OnDictionaryLoadCompleted);
                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                client.GetEmployeePagingCompleted += new EventHandler <GetEmployeePagingCompletedEventArgs>(client_GetEmployeePagingCompleted);
                //client.GetEmployeesWithOutPermissionsCompleted += new EventHandler<GetEmployeesWithOutPermissionsCompletedEventArgs>(client_GetEmployeesWithOutPermissionsCompleted);
                client.GetEmployeeViewsPagingCompleted += new EventHandler <GetEmployeeViewsPagingCompletedEventArgs>(client_GetEmployeeViewsPagingCompleted);
                client.EmployeeDeleteCompleted         += new EventHandler <EmployeeDeleteCompletedEventArgs>(client_EmployeeDeleteCompleted);

                //client.GetEmployeeViewsActivedPagingCompleted += new EventHandler<GetEmployeeViewsActivedPagingCompletedEventArgs>(client_GetEmployeeViewsActivedPagingCompleted);

                permclient = new PermissionServiceClient();
                permclient.GetUserByEmployeeIDCompleted += new EventHandler <Saas.Tools.PermissionWS.GetUserByEmployeeIDCompletedEventArgs>(permclient_GetUserByEmployeeIDCompleted);
                //this.Loaded += new RoutedEventHandler(Employee_Loaded);
            }
            catch (Exception ex)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                return;
            }
        }
Example #2
0
        private void BindEmployee(TreeViewItem item, string postID)
        {
            PersonnelWS.PersonnelServiceClient perclient = new PersonnelWS.PersonnelServiceClient();
            perclient.GetEmployeePostByPostIDCompleted += new EventHandler <PersonnelWS.GetEmployeePostByPostIDCompletedEventArgs>(perclient_GetEmployeePostByPostIDCompleted);

            perclient.GetEmployeePostByPostIDAsync(postID, item);
        }
Example #3
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);
                loadbar.Start();

                DictManager.OnDictionaryLoadCompleted += new EventHandler<OnDictionaryLoadArgs>(DictManager_OnDictionaryLoadCompleted);
                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                client.GetEmployeePagingCompleted += new EventHandler<GetEmployeePagingCompletedEventArgs>(client_GetEmployeePagingCompleted);
                //client.GetEmployeesWithOutPermissionsCompleted += new EventHandler<GetEmployeesWithOutPermissionsCompletedEventArgs>(client_GetEmployeesWithOutPermissionsCompleted);
                client.GetEmployeeViewsPagingCompleted += new EventHandler<GetEmployeeViewsPagingCompletedEventArgs>(client_GetEmployeeViewsPagingCompleted);
                client.EmployeeDeleteCompleted += new EventHandler<EmployeeDeleteCompletedEventArgs>(client_EmployeeDeleteCompleted);

                //client.GetEmployeeViewsActivedPagingCompleted += new EventHandler<GetEmployeeViewsActivedPagingCompletedEventArgs>(client_GetEmployeeViewsActivedPagingCompleted);
                  
                permclient = new PermissionServiceClient();
                permclient.GetUserByEmployeeIDCompleted += new EventHandler<Saas.Tools.PermissionWS.GetUserByEmployeeIDCompletedEventArgs>(permclient_GetUserByEmployeeIDCompleted);
                //this.Loaded += new RoutedEventHandler(Employee_Loaded);
                
                
            }
            catch (Exception ex)
            {
                SMT.SAAS.Application.ExceptionManager.SendException("用户管理", "SysUserManagement", "Views/SysUserManagement", "SysUserManagement", ex);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),
                    Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                return;
            }
        }
Example #4
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);
                loadbar.Start();

                DictManager.OnDictionaryLoadCompleted += new EventHandler <OnDictionaryLoadArgs>(DictManager_OnDictionaryLoadCompleted);
                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                client.GetEmployeePagingCompleted += new EventHandler <GetEmployeePagingCompletedEventArgs>(client_GetEmployeePagingCompleted);
                //client.GetEmployeesWithOutPermissionsCompleted += new EventHandler<GetEmployeesWithOutPermissionsCompletedEventArgs>(client_GetEmployeesWithOutPermissionsCompleted);
                // client.GetEmployeeViewsPagingCompleted+=new EventHandler<GetEmployeeViewsPagingCompletedEventArgs>(client_GetEmployeeViewsPagingCompleted);
                client.GetEmployeeViewsWithOutPermissionsCompleted += new EventHandler <GetEmployeeViewsWithOutPermissionsCompletedEventArgs>(client_GetEmployeeViewsWithOutPermissionsCompleted);
                client.EmployeeDeleteCompleted += new EventHandler <EmployeeDeleteCompletedEventArgs>(client_EmployeeDeleteCompleted);

                orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
                orgClient.GetCompanyActivedCompleted    += new EventHandler <SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
                orgClient.GetDepartmentActivedCompleted += new EventHandler <SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
                orgClient.GetPostActivedCompleted       += new EventHandler <SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);

                permclient = new PermissionServiceClient();
                permclient.GetUserByEmployeeIDCompleted += new EventHandler <Saas.Tools.PermissionWS.GetUserByEmployeeIDCompletedEventArgs>(permclient_GetUserByEmployeeIDCompleted);
                permclient.getFbAdminsCompleted         += new EventHandler <getFbAdminsCompletedEventArgs>(permclient_getFbAdminsCompleted);
                //this.Loaded += new RoutedEventHandler(Employee_Loaded);
                permclient.DeleteFbAdminCompleted += new EventHandler <DeleteFbAdminCompletedEventArgs>(permclient_DeleteFbAdminCompleted);
            }
            catch (Exception ex)
            {
                SMT.SAAS.Application.ExceptionManager.SendException("用户管理", "SysUserManagement", "Views/SysUserManagement", "SysUserManagement", ex);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                return;
            }
        }
Example #5
0
        /// <summary>
        /// 绑定员工列表
        /// </summary>
        private void BindEmployeeList()
        {
            int    pageSize = 0, pageIndex = 0, pageCount = 0;
            string filter = string.Empty, strMsg = string.Empty;

            System.Collections.ObjectModel.ObservableCollection <string> paras = new System.Collections.ObjectModel.ObservableCollection <string>();

            if (!string.IsNullOrEmpty(txtEmpName.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += " @" + paras.Count().ToString() + ".Contains(EMPLOYEECNAME)";
                paras.Add(txtEmpName.Text.Trim());
            }

            string sType = "", sValue = "";

            //2012-9-13
            //不需要选择机构就可进行查询,于是注释
            //  GetOrgInfoByChecked(ref sType, ref sValue, ref strMsg);

            if (!string.IsNullOrWhiteSpace(strMsg))
            {
                Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("CAUTION"), strMsg);
                return;
            }

            //不分页
            pageIndex = 1;
            pageSize  = 999999;

            PersonnelWS.PersonnelServiceClient clientPers = new PersonnelWS.PersonnelServiceClient();
            Employeestate statetmp = cbxEmployeeState.SelectedItem as Employeestate;

            if (statetmp != null)
            {
                if (statetmp.Value == "1")
                {
                    clientPers.GetLeaveEmployeeViewsPagingCompleted += new EventHandler <PersonnelWS.GetLeaveEmployeeViewsPagingCompletedEventArgs>(clientPers_GetLeaveEmployeeViewsPagingCompleted);

                    clientPers.GetLeaveEmployeeViewsPagingAsync(pageIndex, pageSize, "EMPLOYEECNAME",
                                                                filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
                }
                else
                {
                    clientPers.GetEmployeeViewsPagingCompleted += new EventHandler <PersonnelWS.GetEmployeeViewsPagingCompletedEventArgs>(clientPers_GetEmployeeViewsPagingCompleted);
                    clientPers.GetEmployeeViewsPagingAsync(pageIndex, pageSize, "EMPLOYEECNAME",
                                                           filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
                }
            }
            else
            {
                clientPers.GetEmployeeViewsPagingCompleted += new EventHandler <PersonnelWS.GetEmployeeViewsPagingCompletedEventArgs>(clientPers_GetEmployeeViewsPagingCompleted);
                clientPers.GetEmployeeViewsPagingAsync(pageIndex, pageSize, "EMPLOYEECNAME",
                                                       filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
            }
        }
 void EmployeeLeaveRecordForm_Loaded(object sender, RoutedEventArgs e)
 {
     clientAtt = new AttendanceServiceClient();
     perClient = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
     RegisterEvents();
     InitParas();
     UnVisibleGridToolControl();
 }
Example #7
0
 private void BindEmployee(TreeViewItem item, string postID)
 {
     //postIDsCach.Add(postID,"0");
     if (postIDsCach.ContainsKey(postID))
     {
         return;
     }
     PersonnelWS.PersonnelServiceClient perclient = new PersonnelWS.PersonnelServiceClient();
     perclient.GetEmployeePostByPostIDCompleted += new EventHandler <PersonnelWS.GetEmployeePostByPostIDCompletedEventArgs>(perclient_GetEmployeePostByPostIDCompleted);
     loadbar.Start();
     perclient.GetEmployeePostByPostIDAsync(postID, item);
 }
Example #8
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);

                DtGrid.CurrentCellChanged += new EventHandler <EventArgs>(DtGrid_CurrentCellChanged);

                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                client.GetEmployeePagingCompleted += new EventHandler <GetEmployeePagingCompletedEventArgs>(client_GetEmployeePagingCompleted);
                client.EmployeeDeleteCompleted    += new EventHandler <EmployeeDeleteCompletedEventArgs>(client_EmployeeDeleteCompleted);

                orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
                orgClient.GetCompanyActivedCompleted    += new EventHandler <SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
                orgClient.GetDepartmentActivedCompleted += new EventHandler <SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
                orgClient.GetPostActivedCompleted       += new EventHandler <SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);

                permclient = new PermissionServiceClient();
                permclient.GetUserByEmployeeIDCompleted += new EventHandler <Saas.Tools.PermissionWS.GetUserByEmployeeIDCompletedEventArgs>(permclient_GetUserByEmployeeIDCompleted);
                this.Loaded += new RoutedEventHandler(Employee_Loaded);
                this.ToolBar.btnNew.Visibility = Visibility.Collapsed;
                //this.ToolBar.btnNew.Click += new RoutedEventHandler(btnAdd_Click);
                this.ToolBar.btnEdit.Click += new RoutedEventHandler(BtnAlter_Click);
                //this.ToolBar.btnDelete.Click += new RoutedEventHandler(btnDel_Click);
                this.ToolBar.btnDelete.Visibility         = Visibility.Collapsed;
                this.ToolBar.btnRefresh.Click            += new RoutedEventHandler(btnRefresh_Click);
                this.ToolBar.BtnView.Click               += new RoutedEventHandler(BtnView_Click);
                this.ToolBar.retNew.Visibility            = Visibility.Collapsed;
                this.ToolBar.btnNew.Visibility            = Visibility.Collapsed;
                this.ToolBar.cbxCheckState.Visibility     = Visibility.Collapsed;
                this.ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;
                this.ToolBar.btnDelete.Visibility         = Visibility.Collapsed;
                this.ToolBar.btnAudit.Visibility          = Visibility.Collapsed;
                this.ToolBar.retAudit.Visibility          = Visibility.Collapsed;
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
            }
        }
Example #9
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);
              
                DtGrid.CurrentCellChanged += new EventHandler<EventArgs>(DtGrid_CurrentCellChanged);

                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                client.GetEmployeePagingCompleted += new EventHandler<GetEmployeePagingCompletedEventArgs>(client_GetEmployeePagingCompleted);
                client.EmployeeDeleteCompleted += new EventHandler<EmployeeDeleteCompletedEventArgs>(client_EmployeeDeleteCompleted);

                orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
                orgClient.GetCompanyActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
                orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
                orgClient.GetPostActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);

                permclient = new PermissionServiceClient();
                permclient.GetUserByEmployeeIDCompleted += new EventHandler<Saas.Tools.PermissionWS.GetUserByEmployeeIDCompletedEventArgs>(permclient_GetUserByEmployeeIDCompleted);
                this.Loaded += new RoutedEventHandler(Employee_Loaded);
                this.ToolBar.btnNew.Visibility = Visibility.Collapsed;
                //this.ToolBar.btnNew.Click += new RoutedEventHandler(btnAdd_Click);
                this.ToolBar.btnEdit.Click += new RoutedEventHandler(BtnAlter_Click);
                //this.ToolBar.btnDelete.Click += new RoutedEventHandler(btnDel_Click);
                this.ToolBar.btnDelete.Visibility = Visibility.Collapsed;
                this.ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
                this.ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
                this.ToolBar.retNew.Visibility = Visibility.Collapsed;
                this.ToolBar.btnNew.Visibility = Visibility.Collapsed;
                this.ToolBar.cbxCheckState.Visibility = Visibility.Collapsed;
                this.ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;
                this.ToolBar.btnDelete.Visibility = Visibility.Collapsed;
                this.ToolBar.btnAudit.Visibility = Visibility.Collapsed;
                this.ToolBar.retAudit.Visibility = Visibility.Collapsed;
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
            }
        }
Example #10
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);
                loadbar.Stop();
               
                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                client.GetContactsListPagingCompleted += new EventHandler<GetContactsListPagingCompletedEventArgs>(client_GetContactsListPagingCompleted);
                client.ExportContactsListCompleted += new EventHandler<ExportContactsListCompletedEventArgs>(client_ExportContactsListCompleted);
                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);

                
                ToolBar.btnOutExcel.Visibility = Visibility.Visible;
                ToolBar.btnOutExcel.Click += new RoutedEventHandler(btnOutExcel_Click);

                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);
            }
            catch (Exception)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                 Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
        }
Example #11
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);
                loadbar.Stop();

                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                client.GetContactsListPagingCompleted += new EventHandler <GetContactsListPagingCompletedEventArgs>(client_GetContactsListPagingCompleted);
                client.ExportContactsListCompleted    += new EventHandler <ExportContactsListCompletedEventArgs>(client_ExportContactsListCompleted);
                treeOrganization.SelectedClick        += new EventHandler(treeOrganization_SelectedClick);


                ToolBar.btnOutExcel.Visibility = Visibility.Visible;
                ToolBar.btnOutExcel.Click     += new RoutedEventHandler(btnOutExcel_Click);

                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);
            }
            catch (Exception)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
        }
Example #12
0
        /// <summary>
        /// 绑定员工列表
        /// </summary>
        private void BindEmployeeList()
        {
            int pageSize = 0, pageIndex = 0, pageCount = 0;
            string filter = string.Empty, strMsg = string.Empty;
            System.Collections.ObjectModel.ObservableCollection<string> paras = new System.Collections.ObjectModel.ObservableCollection<string>();

            if (!string.IsNullOrEmpty(txtEmpName.Text.Trim()))
            {
                if (!string.IsNullOrEmpty(filter))
                {
                    filter += " and ";
                }
                filter += " @" + paras.Count().ToString() + ".Contains(EMPLOYEECNAME)";
                paras.Add(txtEmpName.Text.Trim());
            }

            string sType = "", sValue = "";
            //2012-9-13
            //不需要选择机构就可进行查询,于是注释
          //  GetOrgInfoByChecked(ref sType, ref sValue, ref strMsg);

            if (!string.IsNullOrWhiteSpace(strMsg))
            {
                Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("CAUTION"), strMsg);
                return;
            }

            //不分页
            pageIndex = 1;
            pageSize = 999999;

            PersonnelWS.PersonnelServiceClient clientPers = new PersonnelWS.PersonnelServiceClient();
            Employeestate statetmp = cbxEmployeeState.SelectedItem as Employeestate;
            if (statetmp != null)
            {
                if (statetmp.Value == "1")
                {
                    clientPers.GetLeaveEmployeeViewsPagingCompleted += new EventHandler<PersonnelWS.GetLeaveEmployeeViewsPagingCompletedEventArgs>(clientPers_GetLeaveEmployeeViewsPagingCompleted);
                    
                    clientPers.GetLeaveEmployeeViewsPagingAsync(pageIndex, pageSize, "EMPLOYEECNAME",
                filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
                }
                else
                {
                    clientPers.GetEmployeeViewsPagingCompleted += new EventHandler<PersonnelWS.GetEmployeeViewsPagingCompletedEventArgs>(clientPers_GetEmployeeViewsPagingCompleted);
                    clientPers.GetEmployeeViewsPagingAsync(pageIndex, pageSize, "EMPLOYEECNAME",
                        filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
                }
            }
            else
            {
                clientPers.GetEmployeeViewsPagingCompleted += new EventHandler<PersonnelWS.GetEmployeeViewsPagingCompletedEventArgs>(clientPers_GetEmployeeViewsPagingCompleted);
                clientPers.GetEmployeeViewsPagingAsync(pageIndex, pageSize, "EMPLOYEECNAME",
                    filter, paras, pageCount, sType, sValue, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
            }
        }
Example #13
0
 private void BindEmployee(TreeViewItem item, string postID)
 {
     //postIDsCach.Add(postID,"0");
     if (postIDsCach.ContainsKey(postID)) return;
     PersonnelWS.PersonnelServiceClient perclient = new PersonnelWS.PersonnelServiceClient();
     perclient.GetEmployeePostByPostIDCompleted += new EventHandler<PersonnelWS.GetEmployeePostByPostIDCompletedEventArgs>(perclient_GetEmployeePostByPostIDCompleted);
     loadbar.Start();
     perclient.GetEmployeePostByPostIDAsync(postID, item);
 }
Example #14
0
 private void BindEmployee(TreeViewItem item, string postID)
 {
     //postIDsCach.Add(postID,"0");
     if (postIDsCach.ContainsKey(postID)) return;
     PersonnelWS.PersonnelServiceClient perclient = new PersonnelWS.PersonnelServiceClient();
     perclient.GetEmployeePostByPostIDCompleted += new EventHandler<PersonnelWS.GetEmployeePostByPostIDCompletedEventArgs>(perclient_GetEmployeePostByPostIDCompleted);
    // perclient.GetEmployeePostByPostIDViewCompleted += new EventHandler<PersonnelWS.GetEmployeePostByPostIDViewCompletedEventArgs>(perclient_GetEmployeePostByPostIDViewCompleted);
     loadbar.Start();
     //原来的根据岗位id找下面的人没有权限控制,以后如有变更,改会来就行
     perclient.GetEmployeePostByPostIDAsync(postID, item);
    // perclient.GetEmployeePostByPostIDViewAsync(postID, CurrentUserID, item);
 }
Example #15
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);
                loadbar.Stop();
                //DtGrid.CurrentCellChanged += new EventHandler<EventArgs>(DtGrid_CurrentCellChanged);

                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                //client.GetEmployeePagingCompleted += new EventHandler<GetEmployeePagingCompletedEventArgs>(client_GetEmployeePagingCompleted);
                client.EmployeeDeleteCompleted += new EventHandler <EmployeeDeleteCompletedEventArgs>(client_EmployeeDeleteCompleted);

                //client.GetEmployeeViewsPagingCompleted += new EventHandler<GetEmployeeViewsPagingCompletedEventArgs>(client_GetEmployeeViewsPagingCompleted);
                client.GetEmployeeBasicInfoPagingViewCompleted += new EventHandler <GetEmployeeBasicInfoPagingViewCompletedEventArgs>(client_GetEmployeeBasicInfoPagingViewCompleted);

                client.ExportEmployeeCompleted += new EventHandler <ExportEmployeeCompletedEventArgs>(client_ExportEmployeeCompleted);
                client.GetLeaveEmployeeViewsPagingCompleted += new EventHandler <GetLeaveEmployeeViewsPagingCompletedEventArgs>(client_GetLeaveEmployeeViewsPagingCompleted);
                // orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
                //orgClient.GetCompanyActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
                //orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
                //orgClient.GetPostActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);

                this.Loaded += new RoutedEventHandler(Employee_Loaded);
                this.ToolBar.btnNew.Click                += new RoutedEventHandler(btnAdd_Click);
                this.ToolBar.btnEdit.Click               += new RoutedEventHandler(BtnAlter_Click);
                this.ToolBar.btnDelete.Click             += new RoutedEventHandler(btnDel_Click);
                this.ToolBar.btnRefresh.Click            += new RoutedEventHandler(btnRefresh_Click);
                this.ToolBar.BtnView.Click               += new RoutedEventHandler(BtnView_Click);
                this.ToolBar.retNew.Visibility            = Visibility.Collapsed;
                this.ToolBar.btnNew.Visibility            = Visibility.Collapsed;
                this.ToolBar.cbxCheckState.Visibility     = Visibility.Collapsed;
                this.ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;
                this.ToolBar.btnDelete.Visibility         = Visibility.Collapsed;
                this.ToolBar.btnAudit.Visibility          = Visibility.Collapsed;
                this.ToolBar.retAudit.Visibility          = Visibility.Collapsed;

                ImageButton _ImgButtonViewInTime = new ImageButton();
                _ImgButtonViewInTime.VerticalAlignment = VerticalAlignment.Center;
                _ImgButtonViewInTime.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("员工即时信息")).Click += new RoutedEventHandler(_ImgButtonViewInTime_Click);
                ToolBar.stpOtherAction.Children.Add(_ImgButtonViewInTime);

                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);

                ImageButton _ImgButtonViewBasicInfo = new ImageButton();
                _ImgButtonViewBasicInfo.VerticalAlignment = VerticalAlignment.Center;
                _ImgButtonViewBasicInfo.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("报表信息")).Click += new RoutedEventHandler(_ImgButtonViewBasicInfo_Click);
                ToolBar.stpOtherAction.Children.Add(_ImgButtonViewBasicInfo);

                //ImageButton _ImgButtonEmployeeTotal = new ImageButton();
                //_ImgButtonEmployeeTotal.VerticalAlignment = VerticalAlignment.Center;
                //_ImgButtonEmployeeTotal.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("统计报表")).Click += new RoutedEventHandler(_ImgButtonEmployeeTotal_Click);
                //ToolBar.stpOtherAction.Children.Add(_ImgButtonEmployeeTotal);

                //ImageButton _ImgButtonEmployeeStruct = new ImageButton();
                //_ImgButtonEmployeeStruct.VerticalAlignment = VerticalAlignment.Center;
                //_ImgButtonEmployeeStruct.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("结构报表")).Click += new RoutedEventHandler(_ImgButtonEmployeeStruct_Click);
                //ToolBar.stpOtherAction.Children.Add(_ImgButtonEmployeeStruct);

                //ImageButton _ImgButtonReport = new ImageButton();
                //_ImgButtonReport.VerticalAlignment = VerticalAlignment.Center;
                //_ImgButtonReport.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("薪酬保险缴交报表")).Click += new RoutedEventHandler(_ImgButtonReports_Click);
                //ToolBar.stpOtherAction.Children.Add(_ImgButtonReport);

                ToolBar.btnOutExcel.Visibility = Visibility.Visible;
                ToolBar.btnOutExcel.Click     += new RoutedEventHandler(btnOutExcel_Click);

                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);
            }
            catch (Exception)
            {
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
        }
Example #16
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);
                loadbar.Start();

                DictManager.OnDictionaryLoadCompleted += new EventHandler<OnDictionaryLoadArgs>(DictManager_OnDictionaryLoadCompleted);
                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                client.GetEmployeePagingCompleted += new EventHandler<GetEmployeePagingCompletedEventArgs>(client_GetEmployeePagingCompleted);
                //client.GetEmployeesWithOutPermissionsCompleted += new EventHandler<GetEmployeesWithOutPermissionsCompletedEventArgs>(client_GetEmployeesWithOutPermissionsCompleted);
               // client.GetEmployeeViewsPagingCompleted+=new EventHandler<GetEmployeeViewsPagingCompletedEventArgs>(client_GetEmployeeViewsPagingCompleted);
                client.GetEmployeeViewsWithOutPermissionsCompleted += new EventHandler<GetEmployeeViewsWithOutPermissionsCompletedEventArgs>(client_GetEmployeeViewsWithOutPermissionsCompleted);
                client.EmployeeDeleteCompleted += new EventHandler<EmployeeDeleteCompletedEventArgs>(client_EmployeeDeleteCompleted);

                orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
                orgClient.GetCompanyActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
                orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
                orgClient.GetPostActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);

                permclient = new PermissionServiceClient();
                permclient.GetUserByEmployeeIDCompleted += new EventHandler<Saas.Tools.PermissionWS.GetUserByEmployeeIDCompletedEventArgs>(permclient_GetUserByEmployeeIDCompleted);
                permclient.getFbAdminsCompleted += new EventHandler<getFbAdminsCompletedEventArgs>(permclient_getFbAdminsCompleted);
                //this.Loaded += new RoutedEventHandler(Employee_Loaded);
                permclient.DeleteFbAdminCompleted += new EventHandler<DeleteFbAdminCompletedEventArgs>(permclient_DeleteFbAdminCompleted);
                
            }
            catch (Exception ex)
            {
               ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),
                    Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                return;
            }
        }
Example #17
0
        private void BindEmployee(TreeViewItem item, string postID)
        {
            PersonnelWS.PersonnelServiceClient perclient = new PersonnelWS.PersonnelServiceClient();
            perclient.GetEmployeePostByPostIDCompleted += new EventHandler<PersonnelWS.GetEmployeePostByPostIDCompletedEventArgs>(perclient_GetEmployeePostByPostIDCompleted);

            perclient.GetEmployeePostByPostIDAsync(postID, item);
        }
Example #18
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);
                loadbar.Stop();
                //DtGrid.CurrentCellChanged += new EventHandler<EventArgs>(DtGrid_CurrentCellChanged);

                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                //client.GetEmployeePagingCompleted += new EventHandler<GetEmployeePagingCompletedEventArgs>(client_GetEmployeePagingCompleted);
                client.EmployeeDeleteCompleted += new EventHandler<EmployeeDeleteCompletedEventArgs>(client_EmployeeDeleteCompleted);

                //client.GetEmployeeViewsPagingCompleted += new EventHandler<GetEmployeeViewsPagingCompletedEventArgs>(client_GetEmployeeViewsPagingCompleted);
                client.GetEmployeeBasicInfoPagingViewCompleted += new EventHandler<GetEmployeeBasicInfoPagingViewCompletedEventArgs>(client_GetEmployeeBasicInfoPagingViewCompleted);

                client.ExportEmployeeCompleted += new EventHandler<ExportEmployeeCompletedEventArgs>(client_ExportEmployeeCompleted);
                client.GetLeaveEmployeeViewsPagingCompleted += new EventHandler<GetLeaveEmployeeViewsPagingCompletedEventArgs>(client_GetLeaveEmployeeViewsPagingCompleted);
                // orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
                //orgClient.GetCompanyActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
                //orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
                //orgClient.GetPostActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);

                this.Loaded += new RoutedEventHandler(Employee_Loaded);
                this.ToolBar.btnNew.Click += new RoutedEventHandler(btnAdd_Click);
                this.ToolBar.btnEdit.Click += new RoutedEventHandler(BtnAlter_Click);
                this.ToolBar.btnDelete.Click += new RoutedEventHandler(btnDel_Click);
                this.ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
                this.ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
                this.ToolBar.retNew.Visibility = Visibility.Collapsed;
                this.ToolBar.btnNew.Visibility = Visibility.Collapsed;
                this.ToolBar.cbxCheckState.Visibility = Visibility.Collapsed;
                this.ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;
                this.ToolBar.btnDelete.Visibility = Visibility.Collapsed;
                this.ToolBar.btnAudit.Visibility = Visibility.Collapsed;
                this.ToolBar.retAudit.Visibility = Visibility.Collapsed;

                ImageButton _ImgButtonViewInTime = new ImageButton();
                _ImgButtonViewInTime.VerticalAlignment = VerticalAlignment.Center;
                _ImgButtonViewInTime.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("员工即时信息")).Click += new RoutedEventHandler(_ImgButtonViewInTime_Click);
                ToolBar.stpOtherAction.Children.Add(_ImgButtonViewInTime);

                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);

                ImageButton _ImgButtonViewBasicInfo = new ImageButton();
                _ImgButtonViewBasicInfo.VerticalAlignment = VerticalAlignment.Center;
                _ImgButtonViewBasicInfo.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("报表信息")).Click += new RoutedEventHandler(_ImgButtonViewBasicInfo_Click);
                ToolBar.stpOtherAction.Children.Add(_ImgButtonViewBasicInfo);

                //ImageButton _ImgButtonEmployeeTotal = new ImageButton();
                //_ImgButtonEmployeeTotal.VerticalAlignment = VerticalAlignment.Center;
                //_ImgButtonEmployeeTotal.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("统计报表")).Click += new RoutedEventHandler(_ImgButtonEmployeeTotal_Click);
                //ToolBar.stpOtherAction.Children.Add(_ImgButtonEmployeeTotal);

                //ImageButton _ImgButtonEmployeeStruct = new ImageButton();
                //_ImgButtonEmployeeStruct.VerticalAlignment = VerticalAlignment.Center;
                //_ImgButtonEmployeeStruct.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("结构报表")).Click += new RoutedEventHandler(_ImgButtonEmployeeStruct_Click);
                //ToolBar.stpOtherAction.Children.Add(_ImgButtonEmployeeStruct);

                //ImageButton _ImgButtonReport = new ImageButton();
                //_ImgButtonReport.VerticalAlignment = VerticalAlignment.Center;
                //_ImgButtonReport.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("薪酬保险缴交报表")).Click += new RoutedEventHandler(_ImgButtonReports_Click);
                //ToolBar.stpOtherAction.Children.Add(_ImgButtonReport);

                ToolBar.btnOutExcel.Visibility = Visibility.Visible;
                ToolBar.btnOutExcel.Click += new RoutedEventHandler(btnOutExcel_Click);

                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);
            }
            catch (Exception )
            {
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                 Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
        }