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;
            }
        }
Esempio n. 2
0
        public CreateCautationView(SiteCautationView parent, ObservableCollection <SiteCautationModel> listofSelectedCautation)
        {
            this.parent = parent;

            createCautationViewModel = new VIEWMODEL.CreateCautationViewModel(this, listofSelectedCautation);
            this.DataContext         = createCautationViewModel;
            InitializeComponent();

            this.Activate();

            CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(ClientList.ItemsSource);

            view.Filter = UserFilter;
        }