Click here to Skip to main content
15,894,343 members
Articles / Database Development / SQL Server

Silverlight 2 Database Updating

Rate me:
Please Sign up or sign in to vote.
4.08/5 (7 votes)
30 Aug 2008CPOL8 min read 150.6K   1.2K   45  
Perform database updates from Silverlight applications.
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SilverlightUpdateChanges
{
    public partial class Widget: object, System.ComponentModel.INotifyPropertyChanged
    {

        private string _ID;
        private string _Name;
        private string _Colour;

        public string ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                if ((object.ReferenceEquals(this._ID, value) != true))
                {
                    this._ID = value;
                    this.RaisePropertyChanged("ID");
                }
            }
        }

        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                if ((object.ReferenceEquals(this._Name, value) != true))
                {
                    this._Name = value;
                    this.RaisePropertyChanged("Name");
                }
            }
        }

        public string Colour
        {
            get
            {
                return this._Colour;
            }
            set
            {
                if ((object.ReferenceEquals(this._Colour, value) != true))
                {
                    this._Colour = value;
                    this.RaisePropertyChanged("Colour");
                }
            }
        }

        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        protected void RaisePropertyChanged(string propertyName)
        {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null))
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions