using System;
using System.Collections;
using System.ComponentModel;

namespace ZANZILib.Protocols.ResultOne
{
    /// <summary>
    /// This class returns the generic info for a result object.
    /// This info is returned when an item is available for a query
    /// ??? is databoundable for datagrid  >> ICloneable, IList, ICollection, IEnumerable
    /// ??? boundable for properybox???
    /// </summary>
    [Serializable]
    public class clsZanziProtResultOne
    {
        #region Variable declaration

        private string m_adres;
        private string m_alias;
        private string m_branch;
        private int m_cell;
        private string m_city;
        private string m_company;
        private string m_currency;
        private int m_fax;
        private long m_giud;
        private string m_name;
        private int m_phone;
        private int m_pictureSize;
        private int m_price;
        private string m_productName;
        private int m_quantity;
        public object zqht;


        //public string m_adres;
        //public string m_alias;
        //public string m_branch;
        //public int m_cell;
        //public string m_city;
        //public string m_company;
        //public string m_currency;
        //public int m_fax;
        //public long m_giud;
        //public string m_name;
        //public int m_phone;
        //public int m_pictureSize;
        //public int m_price;
        //public string m_productName;
        //public int m_quantity;


        #endregion

        #region Structures

        #endregion

        #region Functions
        //zzoi 24feb 2009 parameterless constructor
        public clsZanziProtResultOne()
        {
        }

        /// <summary>Main entry for clsZanziProtResultOne</summary>
        /// <returns>Takes no variables and returns nothing</returns>
        ///<c>public clsZanziProtResultOne()</c 
        public clsZanziProtResultOne(string alias, string productName, string BranchName, string currency,
                                     int price, int quantity, int pictureSize,
                                     string name, string city, string adres, int phone,
                                     int cell, int fax, string company, long giud)
        {
            //
            // TODO: Add constructor logic here
            //
            m_alias = alias;
            m_productName = productName;
            m_branch = BranchName;
            m_currency = currency;
            m_price = price;
            m_quantity = quantity;
            m_pictureSize = pictureSize;
            m_name = name;
            m_city = city;
            m_adres = adres;
            m_phone = phone;
            m_cell = cell;
            m_fax = fax;
            m_company = company;
            m_giud = giud;
        }

//		// The TypeConverter attribute applied to the DefaultFileName property.
//		[TypeConverter(typeof(ZANZILib.clsPropertyConverters.CountryConverter)), 
//		DescriptionAttribute("Please select the country to search in."),
//		DefaultValueAttribute("Not Selected"),
//		CategoryAttribute("Location")]
//		public string Country
//		{
//			//If region of client is set then get that instead
//			get{ return country; }
//			set{ country = value; }
//		}
//		



        public long GUID
        {
            get { return m_giud; }
            set { m_giud = value; }
        }

        [Category("Supplier"),
         Description("The alias of the supplier."),]
        public string Alias
        {
            get { return m_alias; }
            set { m_alias = value; }
        }

        [Category("Product"),
         Description("The name of the product."),]
        public string ProductName
        {
            get { return m_productName; }
            set { m_productName = value; }
        }

        [Category("Value"),
         Description("The currency of the item."),]
        public string Currency
        {
            get { return m_currency; }
            set { m_currency = value; }
        }

        [Category("Value"),
         Description("The price of the item.."),]
        public int Price
        {
            get { return m_price; }
            set { m_price = value; }
        }

        [Category("Product"),
         Description("The unit of quantity."),]
        public int Quantity
        {
            get { return m_quantity; }
            set { m_quantity = value; }
        }

        /// <summary>
        /// a indication if there are pictures
        /// </summary>
        [Category("Other"),
         Description("Please enter the city to search in."),]
        public int PictureSize
        {
            get { return m_pictureSize; }
            set { m_pictureSize = value; }
        }


        [Category("Supplier"),
         Description("The contact name of the supplier."),]
        public string Name
        {
            get { return m_name; }
            set { m_name = value; }
        }

        [Category("Location"),
         Description("The city of origin."),]
        public string City
        {
            get { return m_city; }
            set { m_city = value; }
        }

        [Category("Location"),
         Description("The adres of the supplier."),]
        public string Adres
        {
            get { return m_adres; }
            set { m_adres = value; }
        }

        [Category("Contact"),
         Description("The phone number of the supplier."),]
        public int Phone
        {
            get { return m_phone; }
            set { m_phone = value; }
        }

        [Category("Contact"),
         Description("The cellphone number of the supplier."),]
        public int Cell
        {
            get { return m_cell; }
            set { m_cell = value; }
        }

        [Category("Contact"),
         Description("The faxphone number of the supplier."),]
        public int Fax
        {
            get { return m_fax; }
            set { m_fax = value; }
        }

        [Category("Supplier"),
         Description("The company name of the supplier."),]
        public string Company
        {
            get { return m_company; }
            set { m_company = value; }
        }

        [Category("Supplier"),
         Description("The branch name of the supplier."),]
        public string Branch
        {
            get { return m_branch; }
            set { m_branch = value; }
        }

        /// <summary>
        /// to enable the remoting manager to contact this instance
        /// for other funtions like chat etc.
        /// </summary>

        #endregion

        #region Menu handlers

        #endregion

        #region Custom Windows Form Designer generated code

        #endregion

        #region Events

        #endregion
    }

    #region clsZanziProtResultOne Collection Wrapper

    /// <summary>
    /// A class to facilitate the functionality of the collection editor
    /// In order to serialize the clsZanziProtResultOne collection 
    /// </summary>
    [Serializable]
    public class ZanziProtResultCollection : CollectionBase
    {
        public clsZanziProtResultOne this[int index]
        {
            get { return ((clsZanziProtResultOne)List[index]); }
            set { List[index] = value; }
        }

        public int Add(clsZanziProtResultOne value)
        {
            return (List.Add(value));
        }

        public int IndexOf(clsZanziProtResultOne value)
        {
            return (List.IndexOf(value));
        }

        public void Insert(int index, clsZanziProtResultOne value)
        {
            List.Insert(index, value);
        }

        public void Remove(clsZanziProtResultOne value)
        {
            List.Remove(value);
        }

        public bool Contains(clsZanziProtResultOne value)
        {
            // If value is not of type Int16, this will return false.
            return (List.Contains(value));
        }

        protected override void OnInsert(int index, Object value)
        {
            // Insert additional code to be run only when inserting values.
        }

        protected override void OnRemove(int index, Object value)
        {
            // Insert additional code to be run only when removing values.
        }

        protected override void OnSet(int index, Object oldValue, Object newValue)
        {
            // Insert additional code to be run only when setting values.
        }

        //			protected override void OnValidate( Object value )  
        //			{
        //				if ( value.GetType() != Type.GetType("System.Int16") )
        //					throw new ArgumentException( "value must be of type Int16.", "value" );
        //			}
    }

    #endregion
    //#region clsZanziProtResultOne Collection Wrapper

    ///// <summary>
    ///// A class to facilitate the functionality of the collection editor
    ///// In order to serialize the clsZanziProtResultOne collection 
    ///// </summary>
    //[Serializable]
    //public class ZanziProtResultCollection : CollectionBase
    //{
    //    public clsZanziProtResultOne this[int index]
    //    {
    //        get { return ((clsZanziProtResultOne)List[index]); }
    //        set { List[index] = value; }
    //    }

    //    public int Add(clsZanziProtResultOne value)
    //    {
    //        return (List.Add(value));
    //    }

    //    public int IndexOf(clsZanziProtResultOne value)
    //    {
    //        return (List.IndexOf(value));
    //    }

    //    public void Insert(int index, clsZanziProtResultOne value)
    //    {
    //        List.Insert(index, value);
    //    }

    //    public void Remove(clsZanziProtResultOne value)
    //    {
    //        List.Remove(value);
    //    }

    //    public bool Contains(clsZanziProtResultOne value)
    //    {
    //        // If value is not of type Int16, this will return false.
    //        return (List.Contains(value));
    //    }

    //    protected override void OnInsert(int index, Object value)
    //    {
    //        // Insert additional code to be run only when inserting values.
    //    }

    //    protected override void OnRemove(int index, Object value)
    //    {
    //        // Insert additional code to be run only when removing values.
    //    }

    //    protected override void OnSet(int index, Object oldValue, Object newValue)
    //    {
    //        // Insert additional code to be run only when setting values.
    //    }

    //    //			protected override void OnValidate( Object value )  
    //    //			{
    //    //				if ( value.GetType() != Type.GetType("System.Int16") )
    //    //					throw new ArgumentException( "value must be of type Int16.", "value" );
    //    //			}
    //}

    //#endregion
}