%PDF- %PDF-
Direktori : /www/varak.net/catalog.varak.net/bookUploader/ |
Current File : //www/varak.net/catalog.varak.net/bookUploader/Book.cs |
using System.ComponentModel; using System.Runtime.Serialization; namespace bookUploader { [DataContract] public class Book : INotifyPropertyChanged { private int _author = 0; private string _name = ""; private string _file = ""; private string _authorname = ""; private int _genre = 0; private int _language = 0; private bool _isUploaded = false; public event PropertyChangedEventHandler PropertyChanged; [DataMember] public int Author { get { return _author; } set { _author = value; OnPropertyChanged("Author"); } } [DataMember] public string Name { get { return _name; } set { _name = value; OnPropertyChanged("Name"); } } [DataMember] public string File { get { return _file; } set { _file = value; OnPropertyChanged("File"); } } public string AuthorName { get { return _authorname; } set { _authorname = value; OnPropertyChanged("AuthorName"); } } public bool IsUploaded { get { return _isUploaded; } set { _isUploaded = value; } } [DataMember] public int Genre { get { return _genre; } set { _genre = value; OnPropertyChanged("Genre"); } } [DataMember] public int Language { get { return _language; } set { _language = value; OnPropertyChanged("Language"); } } protected void OnPropertyChanged(string name) { PropertyChangedEventHandler handler = PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(name)); } } } }