예제 #1
0
 /// <summary>
 /// 获取销假记录
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetEmployeeLeaveRecordByIDCompleted(object sender, GetEmployeeLeaveRecordByIDCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
     }
     else
     {
         V_EMPLOYEELEAVERECORD temp = e.Result;
         WordTimePerDay = temp.WorkTimePerDay;
         //perClient.GetEmployeeDetailByIDAsync(cancelLeave.EMPLOYEEID, "Employee");
         perClient.GetEmpOrgInfoByIDAsync(cancelLeave.OWNERID, cancelLeave.OWNERPOSTID, cancelLeave.OWNERDEPARTMENTID, cancelLeave.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);
            }
        }
예제 #3
0
        /// <summary>
        /// 获取签卡记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void clientAtt_GetEmployeeSigninRecordByIDCompleted(object sender, GetEmployeeSigninRecordByIDCompletedEventArgs e)
        {
            try
            {
                if (e.Error == null)
                {
                    SignInRecord = e.Result;

                    if (FormType == FormTypes.Resubmit || FormType == FormTypes.Edit)
                    {
                        SignInRecord.CHECKSTATE = (Convert.ToInt32(CheckStates.UnSubmit)).ToString();
                    }

                    this.DataContext = SignInRecord;

                    string strEmployeeId = string.Empty;

                    if (SignInRecord != null)
                    {
                        strEmployeeId = SignInRecord.EMPLOYEEID;
                    }
                    RefreshUI(RefreshedTypes.ShowProgressBar);
                    perClient.GetEmpOrgInfoByIDAsync(SignInRecord.EMPLOYEEID, SignInRecord.OWNERPOSTID, SignInRecord.OWNERDEPARTMENTID, SignInRecord.OWNERCOMPANYID);
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RefreshUI(RefreshedTypes.HideProgressBar);
            }
        }