Example #1
0
        public override bool Equals(ModelBase otherModel)
        {
            if (otherModel.GetType() != typeof(KeywayModel))
            {
                return(false);
            }

            KeywayModel otherKeyway = otherModel as KeywayModel;

            if (otherKeyway.ID != this.ID)
            {
                return(false);
            }
            else if (otherKeyway.ManufacturerID != this.ManufacturerID)
            {
                return(false);
            }
            else if (otherKeyway.Name != this.Name)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Example #2
0
        private async void UpdateKeywayAsync(int id)
        {
            if (KeywayRepo.IsValidID(id))
            {
                _keywayID = id;
                _keyway   = await KeywayRepo.GetItemAsync(id);
            }
            else
            {
                _keywayID = -1;
                _keyway   = new KeywayModel();
            }

            OnPropertyChanged("Keyway");
            OnPropertyChanged("KeywayID");
        }