Esempio n. 1
0
        /// <summary>
        /// 根据员工ID,获取考勤异常记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void clientAtt_GetAbnormRecordByEmployeeIDCompleted(object sender, GetAbnormRecordByEmployeeIDCompletedEventArgs e)
        {
            try
            {
                if (e.Error == null)
                {
                    AbnormRecordList = e.Result;

                    //AbnormRecordList = AbnormRecordList.Where(m => m.SINGINSTATE != "1").ToList();

                    if (AbnormRecordList == null)
                    {
                        MessageBox.Show("未查询到异常考勤");
                        return;
                    }

                    if (AbnormRecordList.Count() == 0)
                    {
                        //return;
                    }

                    SignInDetailList = MakeSignInDetailByAbnormRecord(AbnormRecordList);
                    dgSignInDetailList.ItemsSource = SignInDetailList;

                    //string strLoginUserId = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    //if (SignInRecord.EMPLOYEEID != strLoginUserId || SignInRecord.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                    //{
                    //    dgSignInDetailList.IsEnabled = false;
                    //    txtRemark.IsEnabled = false;
                    //}
                    //if (SignInRecord.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                    //{
                    //    dgSignInDetailList.IsEnabled = false;
                    //    txtRemark.IsEnabled = false;
                    //}
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RefreshUI(RefreshedTypes.HideProgressBar);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 根据员工ID,获取考勤异常记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void clientAtt_GetAbnormRecordByEmployeeIDCompleted(object sender, GetAbnormRecordByEmployeeIDCompletedEventArgs e)
        {
            try
            {
                if (e.Error == null)
                {
                    AbnormRecordList = e.Result;

                    //AbnormRecordList = AbnormRecordList.Where(m => m.SINGINSTATE != "1").ToList();

                    if (AbnormRecordList == null)
                    {
                        MessageBox.Show("未查询到异常考勤");
                        return;
                    }

                    if (AbnormRecordList.Count() == 0)
                    {
                        //return;
                    }

                    SignInDetailList = MakeSignInDetailByAbnormRecord(AbnormRecordList);
                    dgSignInDetailList.ItemsSource = SignInDetailList;

                    //string strLoginUserId = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                    //if (SignInRecord.EMPLOYEEID != strLoginUserId || SignInRecord.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                    //{
                    //    dgSignInDetailList.IsEnabled = false;
                    //    txtRemark.IsEnabled = false;
                    //}
                    //if (SignInRecord.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                    //{
                    //    dgSignInDetailList.IsEnabled = false;
                    //    txtRemark.IsEnabled = false;
                    //}
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                RefreshUI(RefreshedTypes.HideProgressBar);
            }
        }