예제 #1
0
        public UnauthAviaries(AviaryViewModel model)
        {
            vm          = model;
            DataContext = vm;

            InitializeComponent();
        }
예제 #2
0
        public static IViewModel Create(string tag, EFDbContext context)
        {
            IViewModel model;

            switch (tag)
            {
            case "animal":
                model = new AnimalViewModel(context);
                break;

            case "animalKind":
                model = new AnimalKindViewModel(context);
                break;

            case "ration":
                model = new RationViewModel(context);
                break;

            case "inventory":
                model = new InventoryViewModel(context);
                break;

            case "inventoryType":
                model = new InventoryTypeViewModel(context);
                break;

            case "aviaryType":
                model = new AviaryTypeViewModel(context);
                break;

            case "aviary":
                model = new AviaryViewModel(context);
                break;

            default:
                model = null;
                break;
            }

            return(model);
        }