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

            EmpSalaryStepInputGroup inputGroup = GetEmpSalaryStepInputGroup(this.编号);

            if (inputGroup.A != null && inputGroup.B != null)
            {
                contentDifferentFields = MyHelper.GetModifyFields(inputGroup.A, inputGroup.B);
            }
        }
示例#2
0
        private string Compare(EmpSalaryStepInputGroup 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;

            EmpSalaryStepInputGroup inputGroup = GetEmpSalaryStepInputGroup(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()
        {
            //创建验证录入的记录
            if (另一人已录入 == false)
            {
                AddEmpSalaryStepInput(this.编号, this.员工编号, !this.是验证录入);
            }

            EmpSalaryStepInputGroup inputGroup = GetEmpSalaryStepInputGroup(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 EmpSalaryStepInputGroup GetEmpSalaryStepInputGroup(string number)
        {
            EmpSalaryStepInputGroup inputGroup = new EmpSalaryStepInputGroup();

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

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

            foreach (EmpSalaryStepInput di in objset)
            {
                if (di.是验证录入)
                {
                    inputGroup.B = di;
                }
                else
                {
                    inputGroup.A = di;
                }
            }
            return(inputGroup);
        }
示例#6
0
        public string Compare()
        {
            EmpSalaryStepInputGroup inputGroup = GetEmpSalaryStepInputGroup(this.编号);

            return(Compare(inputGroup));
        }