Example #1
0
        public void GetModifiyFields()
        {
            contentDifferentFields = new List <ModifyField>();

            PersonBorrowInputGroup inputGroup = GetPersonBorrowInputGroup(this.编号);

            if (inputGroup.A != null && inputGroup.B != null)
            {
                contentDifferentFields = MyHelper.GetModifyFields(inputGroup.A, inputGroup.B);
            }
        }
Example #2
0
        private string Compare(PersonBorrowInputGroup 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);
        }
Example #3
0
        //更新比较结果
        public void UpdateCompareResult()
        {
            contentDifferentFields = null;
            anotherInput           = null;

            PersonBorrowInputGroup inputGroup = GetPersonBorrowInputGroup(this.编号);

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

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

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

            PersonBorrowInputGroup inputGroup = GetPersonBorrowInputGroup(this.编号);

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

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

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

            base.OnSaved();
        }
Example #5
0
        public static PersonBorrowInputGroup GetPersonBorrowInputGroup(string number)
        {
            PersonBorrowInputGroup inputGroup = new PersonBorrowInputGroup();

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

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

            foreach (PersonBorrowInput di in objset)
            {
                if (di.是验证录入)
                {
                    inputGroup.B = di;
                }
                else
                {
                    inputGroup.A = di;
                }
            }
            return(inputGroup);
        }
Example #6
0
        public string Compare()
        {
            PersonBorrowInputGroup inputGroup = GetPersonBorrowInputGroup(this.编号);

            return(Compare(inputGroup));
        }