/// <summary>
        /// 修改时获取公司
        /// </summary>
        /// <param name="StrCompanyID">公司ID</param>
        private void GetCompanyNameByCompanyID(string StrCompanyID)
        {
            SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient Organ = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();

            Organ.GetCompanyByIdCompleted += new EventHandler <SMT.Saas.Tools.OrganizationWS.GetCompanyByIdCompletedEventArgs>(Organ_GetCompanyByIdCompleted);
            Organ.GetCompanyByIdAsync(StrCompanyID);
        }
Example #2
0
        private void InitParas(string strID)
        {
            client = new PersonnelServiceClient();
            perclient = new PermissionServiceClient();
            perclient.GetUserNameIsExistNameAddOneCompleted += new EventHandler<Saas.Tools.PermissionWS.GetUserNameIsExistNameAddOneCompletedEventArgs>(perclient_GetUserNameIsExistNameAddOneCompleted);
            client.GetEmployeeEntryByIDCompleted += new EventHandler<GetEmployeeEntryByIDCompletedEventArgs>(client_GetEmployeeEntryByIDCompleted);
            client.EmployeeEntryAddCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_EmployeeEntryAddCompleted);
            client.EmployeeEntryUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_EmployeeEntryUpdateCompleted);
            client.EmployeeEntryDeleteCompleted += new EventHandler<EmployeeEntryDeleteCompletedEventArgs>(client_EmployeeEntryDeleteCompleted);
            // client.GetEmployeePostByEmployeeIDCompleted += new EventHandler<GetEmployeePostByEmployeeIDCompletedEventArgs>(client_GetEmployeePostByEmployeeIDCompleted);
            //client.GetEmployeeByIDCompleted += new EventHandler<GetEmployeeByIDCompletedEventArgs>(client_GetEmployeeByIDCompleted);
            client.GetEmployeeToEngineCompleted += new EventHandler<GetEmployeeToEngineCompletedEventArgs>(client_GetEmployeeToEngineCompleted);
            client.GetEmployeePostByEmployeePostIDCompleted += new EventHandler<GetEmployeePostByEmployeePostIDCompletedEventArgs>(client_GetEmployeePostByEmployeePostIDCompleted);
            perclient = new PermissionServiceClient();
            perclient.SysUserInfoAddCompleted += new EventHandler<SMT.Saas.Tools.PermissionWS.SysUserInfoAddCompletedEventArgs>(perclient_SysUserInfoAddCompleted);
            perclient.SysUserInfoUpdateCompleted += new EventHandler<SysUserInfoUpdateCompletedEventArgs>(perclient_SysUserInfoUpdateCompleted);
            perclient.GetUserByEmployeeIDCompleted += new EventHandler<GetUserByEmployeeIDCompletedEventArgs>(perclient_GetUserByEmployeeIDCompleted);
            
            orclient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
            orclient.GetPostNumberCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostNumberCompletedEventArgs>(orclient_GetPostNumberCompleted);

            Configclient = new HrCommonServiceClient();
            Configclient.GetAppConfigByNameCompleted += new EventHandler<GetAppConfigByNameCompletedEventArgs>(Configclient_GetAppConfigByNameCompleted);
            client.GetEmailNameIsExistNameAddOneCompleted += new EventHandler<GetEmailNameIsExistNameAddOneCompletedEventArgs>(client_GetEmailNameIsExistNameAddOneCompleted);

            if (FormType == FormTypes.Browse)//|| FormType == FormTypes.Audit
            {
                //  this.IsEnabled=false;
                EnablControl();
            }
            if (FormType == FormTypes.Edit || FormType == FormTypes.Resubmit)
            {
                txtUser.Focus();
                txtUser.IsEnabled = true;
                txtPwd.IsEnabled = true;
                txtUser.IsReadOnly = false;
                txtEmployeeCName.IsEnabled = true;
                txtEmployeeCName.IsReadOnly = false;
                dpEntryDate.IsEnabled = true;
                dpOnPostDate.IsEnabled = true;
                cbxPostLevel.IsEnabled = true;
                numPorbationperiod.IsEnabled = true;
            }
            if (FormType == FormTypes.New)
            {
                //员工岗位
                EmployeePost = new T_HR_EMPLOYEEPOST();
                EmployeePost.EMPLOYEEPOSTID = Guid.NewGuid().ToString();
                EmployeePost.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                EmployeePost.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                EmployeePost.EDITSTATE = Convert.ToInt32(EditStates.UnActived).ToString();
                //EmployeePost.CHECKSTATE = Convert.ToInt32(CheckStates.Approved).ToString();  //默认审核成功
                //EmployeePost.EDITSTATE = Convert.ToInt32(EditStates.Actived).ToString();
                EmployeePost.CREATEDATE = DateTime.Now;

                //员工入职
                EmployeeEntry = new T_HR_EMPLOYEEENTRY();
                EmployeeEntry.EMPLOYEEENTRYID = Guid.NewGuid().ToString();
                EmployeeEntry.CREATEUSERID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                EmployeeEntry.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                EmployeeEntry.CREATEDATE = DateTime.Now;

                //系统用户
                SysUser = new T_SYS_USER();
                SysUser.SYSUSERID = Guid.NewGuid().ToString();
                SysUser.STATE = "0";
                SysUser.CREATEUSER = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                SysUser.CREATEDATE = DateTime.Now;

                createUserName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName;
                SetToolBar();
                Utility.InitFileLoad("EmployeeEntry", EmployeeEntry.EMPLOYEEENTRYID, FormType, uploadFile);
            }
            else
            {
                RefreshUI(RefreshedTypes.ShowProgressBar);
                client.GetEmployeeEntryByIDAsync(strID);
                Utility.InitFileLoad("EmployeeEntry", strID, FormType, uploadFile);
            }
        }
        /// <summary>
        /// 修改时获取公司
        /// </summary>
        /// <param name="StrCompanyID">公司ID</param>
        private void GetCompanyNameByCompanyID(string StrCompanyID)
        {
            SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient Organ = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();

            Organ.GetCompanyByIdCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyByIdCompletedEventArgs>(Organ_GetCompanyByIdCompleted);
            Organ.GetCompanyByIdAsync(StrCompanyID);
        }
Example #4
0
 private void InitParas(string strID)
 {
     client = new PersonnelServiceClient();
     flowClient = new Saas.Tools.FlowWFService.ServiceClient();
     client.GetEmployeePostChangeByIDCompleted += new EventHandler<GetEmployeePostChangeByIDCompletedEventArgs>(client_GetEmployeePostChangeByIDCompleted);
     client.EmployeePostChangeAddCompleted += new EventHandler<EmployeePostChangeAddCompletedEventArgs>(client_EmployeePostChangeAddCompleted);
     client.EmployeePostChangeUpdateCompleted += new EventHandler<EmployeePostChangeUpdateCompletedEventArgs>(client_EmployeePostChangeUpdateCompleted);
     client.EmployeePostChangeDeleteCompleted += new EventHandler<EmployeePostChangeDeleteCompletedEventArgs>(client_EmployeePostChangeDeleteCompleted);
     client.GetEmployeePostByIDCompleted += new EventHandler<GetEmployeePostByIDCompletedEventArgs>(client_GetEmployeePostByIDCompleted);
     client.EmployeePostUpdateCompleted += new EventHandler<EmployeePostUpdateCompletedEventArgs>(client_EmployeePostUpdateCompleted);
     client.EmployeePostAddCompleted += new EventHandler<EmployeePostAddCompletedEventArgs>(client_EmployeePostAddCompleted);
     client.EmployeePostChangeCompleted += new EventHandler<EmployeePostChangeCompletedEventArgs>(client_EmployeePostChangeCompleted);
     client.GetEmployeeToEngineCompleted += new EventHandler<GetEmployeeToEngineCompletedEventArgs>(client_GetEmployeeToEngineCompleted);
     client.GetAllPostByEmployeeIDCompleted += new EventHandler<GetAllPostByEmployeeIDCompletedEventArgs>(client_GetAllPostByEmployeeIdCompeted);
     client.CheckBusinesstripCompleted += new EventHandler<CheckBusinesstripCompletedEventArgs>(Client_CheckBusinesstripCompleted);
     client.GetPostsActivedByEmployeeIDCompleted += new EventHandler<GetPostsActivedByEmployeeIDCompletedEventArgs>(client_GetPostsActivedByEmployeeIDCompleted);
     orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
     orgClient.GetPostByIdCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostByIdCompletedEventArgs>(orgClient_GetPostByIdCompleted);
     orgClient.GetPostNumberCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostNumberCompletedEventArgs>(orgClient_GetPostNumberCompleted);
     //fbClient.GetLeavingUserCompleted += new EventHandler<SMT.Saas.Tools.FBServiceWS.GetLeavingUserCompletedEventArgs>(fbClient_GetLeavingUserCompleted);
     //flowClient.IsExistFlowDataByUserIDAsync("","");
     flowClient.IsExistFlowDataByUserIDCompleted += new EventHandler<Saas.Tools.FlowWFService.IsExistFlowDataByUserIDCompletedEventArgs>(flowClient_IsExistFlowDataByUserIDCompleted);
     //DMClient.GetPersonAccountListByMultSearchCompleted += new EventHandler<GetPersonAccountListByMultSearchCompletedEventArgs>(DMClient_GetPersonAccountListByMultSearchCompleted);
     
     this.Loaded += new RoutedEventHandler(EmployeePostChangeForm_Loaded);
     #region 原来的
     /*
     if (FormType == FormTypes.Browse || FormType == FormTypes.Audit)
     {
         this.IsEnabled = false;
     }
     */
     #endregion
 }