Exemple #1
0
        //void client_GetEmployeeEntryByEmployeeIDCompleted(object sender, GetEmployeeEntryByEmployeeIDCompletedEventArgs e)
        //{
        //    if (e.Error != null && e.Error.Message != "")
        //    {
        //        //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
        //        ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
        //       Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
        //    }
        //    else
        //    {
        //        T_HR_EMPLOYEEENTRY temp = e.Result;
        //        if (temp != null)
        //        {
        //            txtPtr.Text = temp.PROBATIONPERIOD.GetValueOrDefault().ToString();
        //            //入职时间
        //            if (temp.ENTRYDATE != null)
        //                txtReportDate.Text = temp.ENTRYDATE.GetValueOrDefault().ToString("yyyy-MM-dd");
        //            //到岗日期
        //            if (temp.ONPOSTDATE != null)
        //                txtOndutyDate.Text = temp.ONPOSTDATE.GetValueOrDefault().ToString("yyyy-MM-dd");
        //        }
        //    }
        //}

        void client_GetEmployeeCheckByIDCompleted(object sender, GetEmployeeCheckByIDCompletedEventArgs e)
        {
            if (e.Error != null && e.Error.Message != "")
            {
                RefreshUI(RefreshedTypes.HideProgressBar);
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
            else
            {
                if (e.Result == null)
                {
                    RefreshUI(RefreshedTypes.HideProgressBar);
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTFOUND"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                    return;
                }

                EmployeeCheck = e.Result;
                if (FormType == FormTypes.Resubmit)
                {
                    EmployeeCheck.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();
                }
                client.GetEmployeePostByEmployeeIDAsync(EmployeeCheck.T_HR_EMPLOYEE.EMPLOYEEID);
                client.GetEmpOrgInfoByIDAsync(EmployeeCheck.T_HR_EMPLOYEE.EMPLOYEEID, EmployeeCheck.T_HR_EMPLOYEE.OWNERPOSTID, EmployeeCheck.T_HR_EMPLOYEE.OWNERDEPARTMENTID, EmployeeCheck.T_HR_EMPLOYEE.OWNERCOMPANYID);
                //RefreshUI(RefreshedTypes.AuditInfo);
                //SetToolBar();
                if (FormType == FormTypes.Browse || FormType == FormTypes.Audit)
                {
                    SetEnabled();
                }
                if (employeeCheck.CHECKSTATE != "0")
                {
                    if (FormType != FormTypes.Resubmit)
                    {
                        Utility.InitFileLoad(FormTypes.Browse, uploadFile, checkid, false);
                        SetEnabled();
                    }
                }
                else
                {
                    Utility.InitFileLoad("T_HR_EMPLOYEECHECK", EmployeeCheck.BEREGULARID, FormTypes.Edit, uploadFile);
                }
            }
        }
Exemple #2
0
        //void client_GetEmployeeEntryByEmployeeIDCompleted(object sender, GetEmployeeEntryByEmployeeIDCompletedEventArgs e)
        //{
        //    if (e.Error != null && e.Error.Message != "")
        //    {
        //        //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
        //        ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
        //       Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
        //    }
        //    else
        //    {
        //        T_HR_EMPLOYEEENTRY temp = e.Result;
        //        if (temp != null)
        //        {
        //            txtPtr.Text = temp.PROBATIONPERIOD.GetValueOrDefault().ToString();
        //            //入职时间
        //            if (temp.ENTRYDATE != null)
        //                txtReportDate.Text = temp.ENTRYDATE.GetValueOrDefault().ToString("yyyy-MM-dd");
        //            //到岗日期
        //            if (temp.ONPOSTDATE != null)
        //                txtOndutyDate.Text = temp.ONPOSTDATE.GetValueOrDefault().ToString("yyyy-MM-dd");
        //        }
        //    }
        //}

        void client_GetEmployeeCheckByIDCompleted(object sender, GetEmployeeCheckByIDCompletedEventArgs e)
        {
            if (e.Error != null && e.Error.Message != "")
            {
                RefreshUI(RefreshedTypes.HideProgressBar);
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
            else
            {
                if (e.Result == null)
                {
                    RefreshUI(RefreshedTypes.HideProgressBar);
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTFOUND"),
               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                    return;
                }

                EmployeeCheck = e.Result;
                if (FormType == FormTypes.Resubmit)
                {
                    EmployeeCheck.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString();

                }
                client.GetEmployeePostByEmployeeIDAsync(EmployeeCheck.T_HR_EMPLOYEE.EMPLOYEEID);
                client.GetEmpOrgInfoByIDAsync(EmployeeCheck.T_HR_EMPLOYEE.EMPLOYEEID, EmployeeCheck.T_HR_EMPLOYEE.OWNERPOSTID, EmployeeCheck.T_HR_EMPLOYEE.OWNERDEPARTMENTID, EmployeeCheck.T_HR_EMPLOYEE.OWNERCOMPANYID);
                //RefreshUI(RefreshedTypes.AuditInfo);
                //SetToolBar();
                if (FormType == FormTypes.Browse || FormType == FormTypes.Audit)
                {
                    SetEnabled();
                }
                if (employeeCheck.CHECKSTATE != "0")
                {
                    if (FormType != FormTypes.Resubmit)
                    {
                        Utility.InitFileLoad(FormTypes.Browse, uploadFile, checkid, false);
                        SetEnabled();
                    }
                }
                else
                {
                    Utility.InitFileLoad("T_HR_EMPLOYEECHECK", EmployeeCheck.BEREGULARID, FormTypes.Edit, uploadFile);
                }

                
            }
        }