|
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Sculpture Code Generation Engine.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// Generated On : 28/08/2008 05:59:40 م
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Text;
using System.Xml.Serialization;
namespace Service
{
/// <summary>
/// Data Contract Class - Categories
/// </summary>
[Serializable]
[XmlRoot(Namespace = "urn:Dawliasoft.Sculpture", IsNullable = false)]
public partial class Categories : DataContractBase, ICloneable
{
#region Private Properties
private System.Int32 _CategoryID;
private System.String _CategoryName;
private System.String _Description;
private System.Byte[] _Picture;
#endregion
#region Constractors
public Categories()
{
}
public Categories(System.Int32 categoryid, System.String categoryname, System.String description, System.Byte[] picture)
{
this.CategoryID = categoryid;
this.CategoryName = categoryname;
this.Description = description;
this.Picture = picture;
}
///<summary>
/// A simple factory method to create a new Categories instance.
///</summary>
public static Categories CreateCategories(System.Int32 categoryid, System.String categoryname, System.String description, System.Byte[] picture)
{
Categories newCategories = new Categories();
newCategories.CategoryID = categoryid;
newCategories.CategoryName = categoryname;
newCategories.Description = description;
newCategories.Picture = picture;
return newCategories;
}
#endregion
#region Puplic Properties
[XmlElement(ElementName = "CategoryID", IsNullable = false, Order = 1)]
public System.Int32 CategoryID
{
get
{
return _CategoryID;
}
set
{
if(this._CategoryID != value)
{
this.OnCategoryIDChanging(value);
this.SendPropertyChanging();
this._CategoryID = value;
this.SendPropertyChanged("CategoryID");
this.OnCategoryIDChanged();
}
}
}
[XmlElement(ElementName = "CategoryName", IsNullable = false, Order = 2)]
public System.String CategoryName
{
get
{
return _CategoryName;
}
set
{
if(this._CategoryName != value)
{
this.OnCategoryNameChanging(value);
this.SendPropertyChanging();
this._CategoryName = value;
this.SendPropertyChanged("CategoryName");
this.OnCategoryNameChanged();
}
}
}
[XmlElement(ElementName = "Description", IsNullable = true, Order = 3)]
public System.String Description
{
get
{
return _Description;
}
set
{
if(this._Description != value)
{
this.OnDescriptionChanging(value);
this.SendPropertyChanging();
this._Description = value;
this.SendPropertyChanged("Description");
this.OnDescriptionChanged();
}
}
}
[XmlElement(ElementName = "Picture", IsNullable = true, Order = 4)]
public System.Byte[] Picture
{
get
{
return _Picture;
}
set
{
if(this._Picture != value)
{
this.OnPictureChanging(value);
this.SendPropertyChanging();
this._Picture = value;
this.SendPropertyChanged("Picture");
this.OnPictureChanged();
}
}
}
#endregion
#region ICloneable Members
///<summary>
/// Returns a Typed Copy of Categories DataContract
///</summary>
public Categories Copy()
{
Categories copy = new Categories();
copy.CategoryID = this.CategoryID;
copy.CategoryName = this.CategoryName;
copy.Description = this.Description;
copy.Picture = this.Picture;
return copy;
}
///<summary>
/// ICloneable.Clone() Member, returns Copy of this Data Contract.
///</summary>
public object Clone()
{
return this.Copy();
}
#endregion
#region Check Equality
public bool Equals(Categories obj)
{
if (obj.CategoryID != this.CategoryID)
return false;
if (obj.CategoryName != this.CategoryName)
return false;
if (obj.Description != this.Description)
return false;
if (obj.Picture != this.Picture)
return false;
return true;
}
#endregion
#region To String
public override string ToString()
{
StringBuilder _string = new StringBuilder();
_string.AppendFormat("<CategoryID>{0}</CategoryID>{1}", this.CategoryID.ToString(), System.Environment.NewLine);
if(this.CategoryName != null)
_string.AppendFormat("<CategoryName>{0}</CategoryName>{1}", this.CategoryName.ToString(), System.Environment.NewLine);
if(this.Description != null)
_string.AppendFormat("<Description>{0}</Description>{1}", this.Description.ToString(), System.Environment.NewLine);
if(this.Picture != null)
_string.AppendFormat("<Picture>{0}</Picture>{1}", this.Picture.ToString(), System.Environment.NewLine);
return _string.ToString();
}
#endregion
#region Extensibility Method Definitions
partial void OnCreated();
partial void OnCategoryIDChanging(System.Int32 value);
partial void OnCategoryIDChanged();
partial void OnCategoryNameChanging(System.String value);
partial void OnCategoryNameChanged();
partial void OnDescriptionChanging(System.String value);
partial void OnDescriptionChanged();
partial void OnPictureChanging(System.Byte[] value);
partial void OnPictureChanged();
#endregion
}
}
|
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.
Program Manager in Sculpture project, Interesting in .NET Model driven development.