Ejemplo n.º 1
0
        public void GetModifiyFields()
        {
            contentDifferentFields = new List <ModifyField>();

            PerformanceSalaryInputGroup inputGroup = GetPerformanceSalaryInputGroup(this.编号);

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

            PerformanceSalaryInputGroup inputGroup = GetPerformanceSalaryInputGroup(this.编号);

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

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

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

            PerformanceSalaryInputGroup inputGroup = GetPerformanceSalaryInputGroup(this.编号);

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

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

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

            base.OnSaved();
        }
Ejemplo n.º 5
0
        public static PerformanceSalaryInputGroup GetPerformanceSalaryInputGroup(string number)
        {
            PerformanceSalaryInputGroup inputGroup = new PerformanceSalaryInputGroup();

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

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

            foreach (PerformanceSalaryInput di in objset)
            {
                if (di.是验证录入)
                {
                    inputGroup.B = di;
                }
                else
                {
                    inputGroup.A = di;
                }
            }
            return(inputGroup);
        }
Ejemplo n.º 6
0
        public string Compare()
        {
            PerformanceSalaryInputGroup inputGroup = GetPerformanceSalaryInputGroup(this.编号);

            return(Compare(inputGroup));
        }