(function() {
    BemsWebApplication.FmsMaterialCodeProgressViewModel = function(data) {
            this.ProgressId = ko.observable();
            this.Name = ko.observable();
            this.Description = ko.observable();
            if(data)
                this.fromJS(data);
    };

    $.extend(BemsWebApplication.FmsMaterialCodeProgressViewModel.prototype, {
        toJS: function() {
            return {
                ProgressId: this.ProgressId(),
                Name: this.Name(),
                Description: this.Description(),
            };
        },

        fromJS: function(data) {
            if(data) {
                this.ProgressId(data.ProgressId);
                this.Name(data.Name);
                this.Description(data.Description);

            }
        }
    });
})();