示例#1
0
        /// <summary>
        /// 获取考勤方案对应的考勤异常配置信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void clientAtt_GetAttendanceSolutionDeductRdListByAttSolIDCompleted(object sender, GetAttendanceSolutionDeductRdListByAttSolIDCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                entAttendanceSolutionDeducts = e.Result;

                if (entAttendanceSolutionDeducts == null)
                {
                    entAttendanceSolutionDeducts = new ObservableCollection <T_HR_ATTENDANCESOLUTIONDEDUCT>();
                }

                if (entAttendanceSolutionDeducts.Count > 0)
                {
                    entAttendanceSolution = new T_HR_ATTENDANCESOLUTION();

                    entAttendanceSolution  = entAttendanceSolutionDeducts[0].T_HR_ATTENDANCESOLUTION;
                    nudLostCardTimes.Value = double.Parse(entAttendanceSolution.ALLOWLOSTCARDTIMES.Value.ToString());
                    nudLateMaxMinute.Value = double.Parse(entAttendanceSolution.ALLOWLATEMAXMINUTE.Value.ToString());
                    nudLateMaxTimes.Value  = double.Parse(entAttendanceSolution.ALLOWLATEMAXTIMES.Value.ToString());

                    entAttendanceDeductMasters = new ObservableCollection <T_HR_ATTENDANCEDEDUCTMASTER>();
                    foreach (T_HR_ATTENDANCESOLUTIONDEDUCT item in entAttendanceSolutionDeducts)
                    {
                        entAttendanceDeductMasters.Add(item.T_HR_ATTENDANCEDEDUCTMASTER);
                    }

                    if (entAttendanceDeductMasters.Count > 0)
                    {
                        dgAttendanceDeductlist.ItemsSource = entAttendanceDeductMasters;
                    }
                }

                this.DataContext = entAttendanceSolutionDeducts;
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
        }
示例#2
0
        /// <summary>
        /// 获取考勤方案对应的考勤异常配置信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void clientAtt_GetAttendanceSolutionDeductRdListByAttSolIDCompleted(object sender, GetAttendanceSolutionDeductRdListByAttSolIDCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                entAttendanceSolutionDeducts = e.Result;

                if (entAttendanceSolutionDeducts == null)
                {
                    entAttendanceSolutionDeducts = new ObservableCollection<T_HR_ATTENDANCESOLUTIONDEDUCT>();
                }

                if (entAttendanceSolutionDeducts.Count > 0)
                {
                    entAttendanceSolution = new T_HR_ATTENDANCESOLUTION();

                    entAttendanceSolution = entAttendanceSolutionDeducts[0].T_HR_ATTENDANCESOLUTION;
                    nudLostCardTimes.Value = double.Parse(entAttendanceSolution.ALLOWLOSTCARDTIMES.Value.ToString());
                    nudLateMaxMinute.Value = double.Parse(entAttendanceSolution.ALLOWLATEMAXMINUTE.Value.ToString());
                    nudLateMaxTimes.Value = double.Parse(entAttendanceSolution.ALLOWLATEMAXTIMES.Value.ToString());

                    entAttendanceDeductMasters = new ObservableCollection<T_HR_ATTENDANCEDEDUCTMASTER>();
                    foreach (T_HR_ATTENDANCESOLUTIONDEDUCT item in entAttendanceSolutionDeducts)
                    {
                        entAttendanceDeductMasters.Add(item.T_HR_ATTENDANCEDEDUCTMASTER);
                    }

                    if (entAttendanceDeductMasters.Count > 0)
                    {
                        dgAttendanceDeductlist.ItemsSource = entAttendanceDeductMasters;
                    }
                }

                this.DataContext = entAttendanceSolutionDeducts;
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
        }