Пример #1
0
        //NEEDS FURTHER CHECKS!! WHAT HAPPENS IF A MODEL IMPLEMENTING IMODEL CLASS IS CASTED TO A MODEL IMPLEMENTING IUPDATERMODEL? WHAT HAPPENS TO THE UPDATE AND DELETE METHODS?
        public void setModel(IModel model)
        {
            this.model = (IUpdaterModel)model;

            if (!model.hasDBConnection())
            {
                view.disableControls();
            }
        }
        public void setModel(IModel model)
        {
            this.model = (IUpdaterModel)model;

            //La momentul setarii model se verfica daca exista conexiune la baza de date si se dezactiveaza/activeaza controlalele din interfata
            if (!model.hasDBConnection())
            {
                disableViewControls();
            }
            else
            {
                //enableViewControls();
            }
        }