Esempio n. 1
0
        public override bool Equals(object obj)
        {
            AccessoryType ac = obj as AccessoryType;

            if (ac == null)
            {
                return(false);
            }

            if (ac.Id != Id)
            {
                return(false);
            }
            if (ac.Name != Name)
            {
                return(false);
            }
            if (ac.Category != Category)
            {
                return(false);
            }
            if (ac.Description != Description)
            {
                return(false);
            }
            if (ac.Price != null && !Price.Equals(ac.Price))
            {
                return(false);
            }
            if (ac.Unit != Unit)
            {
                return(false);
            }

            return(true);
        }
Esempio n. 2
0
 public override string ToString()
 {
     return(AccessoryType.ToString() + " " + Quantity.ToString());
 }