public UnauthInventoryTypes(InventoryTypeViewModel model) { vm = model; DataContext = vm; InitializeComponent(); }
public InventoryAddViewModel CreateInventoryAddViewModel(RoomViewModel room, InventoryTypeViewModel inventoryType, IEnumerable <InventoryTypeViewModel> inventoryTypes, IEnumerable <RoomViewModel> rooms) { return(new InventoryAddViewModel(new DomainModelService.Inventory { Room = room != null ? room.Model : null, InventoryType = inventoryType != null ? inventoryType.Model : null }, inventoryTypes, rooms)); }
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); }
public InventoryTypeEditViewModel CreateInventoryTypeEditViewModel(InventoryTypeViewModel inventoryType, System.Action removeInventoryTypeAction) { return(new InventoryTypeEditViewModel(inventoryType, removeInventoryTypeAction)); }