private void MenuItemClick(object sender, RoutedEventArgs e)
        {
            int index = int.Parse(((Button)e.Source).Uid);

            MenuUnderline.Margin = new Thickness(10 + (150 * index), 0, 0, 0);

            menuItem_grid.Children.Clear();

            switch (index)
            {
            case 0:
                SiteMgmtView siteMgmtView = new SiteMgmtView(this);
                menuItem_grid.Children.Add(siteMgmtView);
                break;

            case 1:
                ClientMgmtView clientMgmtView = new ClientMgmtView(this);
                menuItem_grid.Children.Add(clientMgmtView);
                break;

            case 2:
                OrderMgmtView orderMgmtView = new OrderMgmtView(this);
                menuItem_grid.Children.Add(orderMgmtView);
                break;

            case 3:
                SiteCautationView siteCautationView = new SiteCautationView(this);
                menuItem_grid.Children.Add(siteCautationView);
                break;
            }
        }
Example #2
0
        public AddClientView(ClientMgmtView parent, string action, MODEL.ClientModel clientModel)
        {
            this.parent = parent;

            this.addClientViewModel = new VIEWMODEL.AddClientViewModel(this, action, clientModel);
            this.DataContext        = this.addClientViewModel;
            InitializeComponent();

            this.Activate();
        }