Beispiel #1
0
        // 比较自己和refControl的数据差异,用特殊颜色显示差异字段
        /// <summary>
        /// 比较自己和refControl的数据差异,用特殊颜色显示差异字段
        /// </summary>
        /// <param name="refControl">要和自己进行比较的控件对象</param>
        public void HighlightDifferences(PersonAddressControl refControl)
        {
            if (this.Zipcode != refControl.Zipcode)
            {
                this.label_zipcode_color.BackColor = this.ColorDifference;
            }

            if (this.Address != refControl.Address)
            {
                this.label_address_color.BackColor = this.ColorDifference;
            }

            if (this.PersonName != refControl.PersonName)
            {
                this.label_name_color.BackColor = this.ColorDifference;
            }

            if (this.Department != refControl.Department)
            {
                this.label_department_color.BackColor = this.ColorDifference;
            }

            if (this.Tel != refControl.Tel)
            {
                this.label_tel_color.BackColor = this.ColorDifference;
            }

            if (this.Email != refControl.Email)
            {
                this.label_email_color.BackColor = this.ColorDifference;
            }

            if (this.Bank != refControl.Bank)
            {
                this.label_bank_color.BackColor = this.ColorDifference;
            }

            if (this.Accounts != refControl.Accounts)
            {
                this.label_accounts_color.BackColor = this.ColorDifference;
            }

            if (this.PayStyle != refControl.PayStyle)
            {
                this.label_payStyle_color.BackColor = this.ColorDifference;
            }

            if (this.Comment != refControl.Comment)
            {
                this.label_comment_color.BackColor = this.ColorDifference;
            }
        }
Beispiel #2
0
        // 比较自己和refControl的数据差异,用特殊颜色显示差异字段
        /// <summary>
        /// 比较自己和refControl的数据差异,用特殊颜色显示差异字段
        /// </summary>
        /// <param name="refControl">要和自己进行比较的控件对象</param>
        public void HighlightDifferences(PersonAddressControl refControl)
        {
            if (this.Zipcode != refControl.Zipcode)
                this.label_zipcode_color.BackColor = this.ColorDifference;

            if (this.Address != refControl.Address)
                this.label_address_color.BackColor = this.ColorDifference;

            if (this.PersonName != refControl.PersonName)
                this.label_name_color.BackColor = this.ColorDifference;

            if (this.Department != refControl.Department)
                this.label_department_color.BackColor = this.ColorDifference;

            if (this.Tel != refControl.Tel)
                this.label_tel_color.BackColor = this.ColorDifference;

            if (this.Email != refControl.Email)
                this.label_email_color.BackColor = this.ColorDifference;

            if (this.Bank != refControl.Bank)
                this.label_bank_color.BackColor = this.ColorDifference;

            if (this.Accounts != refControl.Accounts)
                this.label_accounts_color.BackColor = this.ColorDifference;

            if (this.PayStyle != refControl.PayStyle)
                this.label_payStyle_color.BackColor = this.ColorDifference;

            if (this.Comment != refControl.Comment)
                this.label_comment_color.BackColor = this.ColorDifference;
        }