public LoginViewModel(OrderTrackingController controller)
 {
     this.controller = controller;
     this.retrieveOrganizationOrdersCommand = new DelegateCommand(this.RetrieveOrganizationOrders);
     this.loginAsManagerCommand             = new DelegateCommand(this.LoginAsManager);
     this.loginAsSalesCommand      = new DelegateCommand(this.LoginAsSales);
     this.retrieveAllOrdersCommand = new DelegateCommand(this.RetrieveAllOrders);
     this.LoginAsManagerChecked    = true;
     this.LoginAsManager();
 }
Example #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var shell = new Shell();

            shell.Show();

            var controller = new OrderTrackingController(shell);

            controller.Run();
        }
Example #3
0
 public OrderTrackingViewModel(OrderTrackingServiceClient client, OrderTrackingController orderTrackingController, RequestType requestType)
 {
     this.client = client;
     this.orderTrackingController = orderTrackingController;
     this.refreshCommand          = new DelegateCommand(this.RefreshOrders);
     this.logoutCommand           = new DelegateCommand(this.Logout);
     if (requestType == RequestType.OrganizationOrders)
     {
         this.action = new Func <IEnumerable <Order> >(this.client.GetOrdersFromMyOrganization);
     }
     else
     {
         this.action = new Func <IEnumerable <Order> >(this.client.GetAllOrders);
     }
     this.RefreshOrders();
 }
 public LoginViewModel(OrderTrackingController controller)
 {
     this.controller   = controller;
     this.loginCommand = new DelegateCommand(this.ProceedWithLogin);
 }