示例#1
0
        ///// <summary>
        ///// 获取外出申请记录
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        void client_GetOutApplyByIDCompleted(object sender, GetOutApplyByIDCompletedEventArgs e)
        {
            if (e.Error != null && e.Error.Message != "")
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
            else
            {
                OvertimeRecord   = e.Result;
                this.DataContext = OvertimeRecord;

                if (OvertimeRecord == null)
                {
                    this.IsEnabled = false;
                }

                string strLoginUserId = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                if (OvertimeRecord.EMPLOYEEID != strLoginUserId || OvertimeRecord.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                {
                    this.IsEnabled = false;
                }
                perClient.GetEmpOrgInfoByIDAsync(OvertimeRecord.OWNERID, OvertimeRecord.OWNERPOSTID, OvertimeRecord.OWNERDEPARTMENTID, OvertimeRecord.OWNERCOMPANYID);
            }
        }
示例#2
0
        ///// <summary>
        ///// 获取外出申请记录
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        void client_GetOutApplyByIDCompleted(object sender, GetOutApplyByIDCompletedEventArgs e)
        {
            if (e.Error != null && e.Error.Message != "")
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
            else
            {
                OvertimeRecord = e.Result;
                this.DataContext = OvertimeRecord;

                if (OvertimeRecord == null)
                {
                    this.IsEnabled = false;
                }

                string strLoginUserId = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                if (OvertimeRecord.EMPLOYEEID != strLoginUserId || OvertimeRecord.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                {
                    this.IsEnabled = false;
                }
                perClient.GetEmpOrgInfoByIDAsync(OvertimeRecord.OWNERID, OvertimeRecord.OWNERPOSTID, OvertimeRecord.OWNERDEPARTMENTID, OvertimeRecord.OWNERCOMPANYID);
            }
        }