コード例 #1
0
        public void GetModifiyFields()
        {
            contentDifferentFields = new List <ModifyField>();

            PersonPayRateInputGroup inputGroup = GetPersonPayRateInputGroup(this.编号);

            if (inputGroup.A != null && inputGroup.B != null)
            {
                contentDifferentFields = MyHelper.GetModifyFields(inputGroup.A, inputGroup.B);
            }
        }
コード例 #2
0
        private string Compare(PersonPayRateInputGroup inputGroup)
        {
            if (inputGroup.A == null || inputGroup.B == null)
            {
                return("另一人未录入");
            }

            inputGroup.A.Reload();
            inputGroup.B.Reload();

            anotherInput           = this.标识 == inputGroup.A.标识 ? inputGroup.B : inputGroup.A;
            contentDifferentFields = MyHelper.GetModifyFields(inputGroup.A, inputGroup.B);

            string comparingResult = contentDifferentFields.Count == 0 ? "两人录入完全一致" : "两人录入记录不同";

            return(comparingResult);
        }
コード例 #3
0
        //更新比较结果
        public void UpdateCompareResult()
        {
            contentDifferentFields = null;
            anotherInput           = null;

            PersonPayRateInputGroup inputGroup = GetPersonPayRateInputGroup(this.编号);

            if (inputGroup.A != null && inputGroup.B != null)
            {
                string comparingResult = Compare(inputGroup);

                inputGroup.A.UpdateComparingResult(comparingResult);
                inputGroup.B.UpdateComparingResult(comparingResult);

                this.双人录入结果 = comparingResult;
            }
        }
コード例 #4
0
        protected override void OnSaved()
        {
            //创建验证录入的记录
            AddPersonPayRateInput(this.编号, this.员工编号, !this.是验证录入);

            PersonPayRateInputGroup inputGroup = GetPersonPayRateInputGroup(this.编号);

            if (inputGroup.A != null && inputGroup.B != null)
            {
                string comparingResult = Compare(inputGroup);

                inputGroup.A.UpdateComparingResult(comparingResult);
                inputGroup.B.UpdateComparingResult(comparingResult);

                this.双人录入结果 = comparingResult;
            }

            base.OnSaved();
        }
コード例 #5
0
        public static PersonPayRateInputGroup GetPersonPayRateInputGroup(string number)
        {
            PersonPayRateInputGroup inputGroup = new PersonPayRateInputGroup();

            GroupOperator criteria = new GroupOperator(GroupOperatorType.And,
                                                       new BinaryOperator("编号", number, BinaryOperatorType.Equal));

            XPCollection objset = new XPCollection(MyHelper.XpoSession, typeof(PersonPayRateInput), criteria, new SortProperty("录入时间", SortingDirection.Descending));

            foreach (PersonPayRateInput di in objset)
            {
                if (di.是验证录入)
                {
                    inputGroup.B = di;
                }
                else
                {
                    inputGroup.A = di;
                }
            }
            return(inputGroup);
        }
コード例 #6
0
        public string Compare()
        {
            PersonPayRateInputGroup inputGroup = GetPersonPayRateInputGroup(this.编号);

            return(Compare(inputGroup));
        }