Đang chuẩn bị liên kết để tải về tài liệu:
Apress Expert C sharp 2005 (Phần 4)

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Tham khảo tài liệu 'apress expert c sharp 2005 (phần 4)', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 6323_c03_final.qxd 2 27 06 1 23 PM Page 124 124 CHAPTER 3 BUSINESS FRAMEWORK IMPLEMENTATION Inside this method the AddBusinessRules method is called. Before that however the ValidationRules object needs to be given a reference to the business object so it can properly apply the validation rules to the properties. Finally a virtual OnDeserialized method is invoked so the business developer can respond to the deserialization operation if desired. The ValidationRules object maintains a list of currently broken rules. This was used earlier in the implementation of the IsValid property but there s value in exposing the collection itself Browsable false EditorBrowsable EditorBrowsableState.Advanced public virtual Validation.BrokenRulesCollection BrokenRulesCollection get return ValidationRules.GetBrokenRules Within ValidationRules this collection is implemented to be read-only. Even though the collection is exposed as a public property it can t be changed by the UI. However the UI can display the list of broken rules to the user if so desired. System.ComponentModel.IDataErrorInfo Windows Forms data binding uses the IDataErrorInfo interface to interrogate a data source for validation errors. This interface allows a data source such as a business object to provide human-readable descriptions of errors at the object and property levels. This information is used by grid controls and the ErrorProvider control to display error icons and tooltip descriptions. The ValidationRules object will provide a list of broken rules for each property on the object making it relatively easy to implement IDataErrorInfo string IDataErrorInfo.Error get if IsValid return ValidationRules.GetBrokenRules .ToString else return String.Empty string IDataErrorInfo.this string columnName get string result string.Empty if IsValid Validation.BrokenRule rule ValidationRules.GetBrokenRules .GetFirstBrokenRule columnName if rule null result rule.Description return result The Error property returns a text .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.