Esempio n. 1
0
        ///// <summary>
        ///// 获取单据所属员工的员工信息
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        //void perClient_GetEmployeeDetailByIDCompleted(object sender, SMT.Saas.Tools.PersonnelWS.GetEmployeeDetailByIDCompletedEventArgs e)
        //{
        //    if (e.Error != null)
        //    {
        //        Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
        //    }
        //    else
        //    {
        //        SMT.Saas.Tools.PersonnelWS.V_EMPLOYEEPOST employeePost = e.Result;

        //        //赋值
        //        tbOrgName.Text = employeePost.EMPLOYEEPOSTS[0].T_HR_POST.T_HR_POSTDICTIONARY.POSTNAME + " - " + employeePost.EMPLOYEEPOSTS[0].T_HR_POST.T_HR_DEPARTMENT.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME + " - " + employeePost.EMPLOYEEPOSTS[0].T_HR_POST.T_HR_DEPARTMENT.T_HR_COMPANY.CNAME;
        //        tbEmpName.Text = employeePost.T_HR_EMPLOYEE.EMPLOYEECNAME;
        //        if (!string.IsNullOrWhiteSpace(tbOrgName.Text))
        //        {
        //            tbEmpName.Text = tbEmpName.Text + " - " + tbOrgName.Text;
        //        }

        //        tbEmpWorkAge.Text = employeePost.T_HR_EMPLOYEE.WORKINGAGE.ToString();
        //        tbEmpLevel.Text = employeePost.EMPLOYEEPOSTS[0].POSTLEVEL.ToString();

        //        if (cancelLeave.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString() && cancelLeave.EMPLOYEEID != SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID)
        //        {
        //            SetOnlyBrowse();
        //            return;
        //        }

        //        RefreshUI(RefreshedTypes.AuditInfo);
        //        SetToolBar();
        //    }
        //}

        /// <summary>
        /// 获取销假记录更新返回的信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void client_EmployeeCancelLeaveUpdateCompleted(object sender, EmployeeCancelLeaveUpdateCompletedEventArgs e)
        {
            RefreshUI(RefreshedTypes.HideProgressBar);
            if (e.Error != null)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
            else
            {
                string strMsg = e.Result;
                if (!string.IsNullOrWhiteSpace(strMsg) && strMsg != "{SAVESUCCESSED}")
                {
                    strMsg = strMsg.Replace('{', ' ').Replace('}', ' ').Trim();
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(strMsg));
                    return;
                }
                if (cancelLeave.CHECKSTATE == Utility.GetCheckState(CheckStates.UnSubmit))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("UPDATESUCCESSED", Utility.GetResourceStr("CURRENTRECORD", "")));
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("AUDITSUCCESSED", Utility.GetResourceStr("CURRENTRECORD", "")));
                }
                if (closeFormFlag)
                {
                    RefreshUI(RefreshedTypes.Close);
                }
                else
                {
                    RefreshUI(RefreshedTypes.AuditInfo);
                }
            }
            RefreshUI(RefreshedTypes.All);
        }
Esempio n. 2
0
        ///// <summary>
        ///// 获取单据所属员工的员工信息
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        //void perClient_GetEmployeeDetailByIDCompleted(object sender, SMT.Saas.Tools.PersonnelWS.GetEmployeeDetailByIDCompletedEventArgs e)
        //{
        //    if (e.Error != null)
        //    {
        //        Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
        //    }
        //    else
        //    {
        //        SMT.Saas.Tools.PersonnelWS.V_EMPLOYEEPOST employeePost = e.Result;

        //        //赋值
        //        tbOrgName.Text = employeePost.EMPLOYEEPOSTS[0].T_HR_POST.T_HR_POSTDICTIONARY.POSTNAME + " - " + employeePost.EMPLOYEEPOSTS[0].T_HR_POST.T_HR_DEPARTMENT.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME + " - " + employeePost.EMPLOYEEPOSTS[0].T_HR_POST.T_HR_DEPARTMENT.T_HR_COMPANY.CNAME;
        //        tbEmpName.Text = employeePost.T_HR_EMPLOYEE.EMPLOYEECNAME;
        //        if (!string.IsNullOrWhiteSpace(tbOrgName.Text))
        //        {
        //            tbEmpName.Text = tbEmpName.Text + " - " + tbOrgName.Text;
        //        }

        //        tbEmpWorkAge.Text = employeePost.T_HR_EMPLOYEE.WORKINGAGE.ToString();
        //        tbEmpLevel.Text = employeePost.EMPLOYEEPOSTS[0].POSTLEVEL.ToString();

        //        if (cancelLeave.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString() && cancelLeave.EMPLOYEEID != SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID)
        //        {
        //            SetOnlyBrowse();
        //            return;
        //        }

        //        RefreshUI(RefreshedTypes.AuditInfo);
        //        SetToolBar();
        //    }
        //}

        /// <summary>
        /// 获取销假记录更新返回的信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void client_EmployeeCancelLeaveUpdateCompleted(object sender, EmployeeCancelLeaveUpdateCompletedEventArgs e)
        {
            RefreshUI(RefreshedTypes.HideProgressBar);
            if (e.Error != null)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
            else
            {
                string strMsg = e.Result;
                if (!string.IsNullOrWhiteSpace(strMsg) && strMsg != "{SAVESUCCESSED}")
                {
                    strMsg = strMsg.Replace('{', ' ').Replace('}', ' ').Trim();
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(strMsg));
                    return;
                }
                if (cancelLeave.CHECKSTATE == Utility.GetCheckState(CheckStates.UnSubmit))
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("UPDATESUCCESSED", Utility.GetResourceStr("CURRENTRECORD", "")));
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("AUDITSUCCESSED", Utility.GetResourceStr("CURRENTRECORD", "")));
                }
                if (closeFormFlag)
                {
                    RefreshUI(RefreshedTypes.Close);
                }
                else
                {
                    RefreshUI(RefreshedTypes.AuditInfo);
                }
            }
            RefreshUI(RefreshedTypes.All);
        }