示例#1
0
        /// <summary>
        /// 获取加班记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void client_GetOverTimeRdByIDCompleted(object sender, GetOverTimeRdByIDCompletedEventArgs 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.GetEmployeeDetailByIDAsync(OvertimeRecord.EMPLOYEEID, "Employee");
                // perClient.GetEmployeeInfoByEmployeeIDAsync(OvertimeRecord.EMPLOYEEID, "Employee");
                perClient.GetEmpOrgInfoByIDAsync(OvertimeRecord.OWNERID, OvertimeRecord.OWNERPOSTID, OvertimeRecord.OWNERDEPARTMENTID, OvertimeRecord.OWNERCOMPANYID);
            }
        }
示例#2
0
        /// <summary>
        /// 获取加班记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void client_GetOverTimeRdByIDCompleted(object sender, GetOverTimeRdByIDCompletedEventArgs 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.GetEmployeeDetailByIDAsync(OvertimeRecord.EMPLOYEEID, "Employee");
               // perClient.GetEmployeeInfoByEmployeeIDAsync(OvertimeRecord.EMPLOYEEID, "Employee");
                perClient.GetEmpOrgInfoByIDAsync(OvertimeRecord.OWNERID, OvertimeRecord.OWNERPOSTID, OvertimeRecord.OWNERDEPARTMENTID, OvertimeRecord.OWNERCOMPANYID);
            }
        }