///<summary> /// Prepare the Model. ///</summary> public override void Execute( INotification notification ) { // Create User Proxy, UserProxy userProxy = new UserProxy(); //Populate it with dummy data userProxy.AddItem( new UserVo{ Username="******", Fname="Larry", Lname="Stooge", Email="*****@*****.**", Password="******", Department = DeptEnum.ACCT } ); userProxy.AddItem( new UserVo{ Username="******", Fname="Curly", Lname="Stooge", Email="*****@*****.**", Password="******", Department = DeptEnum.SALES } ); userProxy.AddItem( new UserVo{ Username="******", Fname="Moe", Lname="Stooge", Email="*****@*****.**", Password="******", Department = DeptEnum.PLANT } ); // register it Facade.RegisterProxy( userProxy ); // Create Role Proxy RoleProxy roleProxy = new RoleProxy(); //Populate it with dummy data RoleEnum[] lstoogeRoles = { RoleEnum.PAYROLL, RoleEnum.EMP_BENEFITS }; roleProxy.AddItem( new RoleVo("lstooge", new ObservableCollection<RoleEnum>( lstoogeRoles ) ) ); RoleEnum[] cstoogeRoles = { RoleEnum.ACCT_PAY, RoleEnum.ACCT_RCV, RoleEnum.GEN_LEDGER }; roleProxy.AddItem( new RoleVo("cstooge", new ObservableCollection<RoleEnum>( cstoogeRoles ) ) ); RoleEnum[] mstoogeRoles = { RoleEnum.INVENTORY, RoleEnum.PRODUCTION, RoleEnum.SALES, RoleEnum.SHIPPING }; roleProxy.AddItem( new RoleVo("mstooge", new ObservableCollection<RoleEnum>( mstoogeRoles ) ) ); // register it Facade.RegisterProxy( roleProxy ); }
public RolePanelMediator( RolePanel viewComponent ) : base(NAME, viewComponent) { RolePanel.AddRole += onAddRole; RolePanel.RemoveRole += onRemoveRole; RoleProxy = (RoleProxy) Facade.RetrieveProxy( RoleProxy.NAME ); ClearForm(); }