Ejemplo n.º 1
0
        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;
            }
        }
        public AddSiteView(SiteMgmtView parent, string action, MODEL.SiteModel siteModel)
        {
            this.parent = parent;

            this.DataContext = new VIEWMODEL.AddSiteViewModel(this, action, siteModel);
            InitializeComponent();

            this.Activate();
        }
Ejemplo n.º 3
0
        //string LoginId;

        public MainWindow(/*string LoginId=null*/)
        {
            //this.LoginId = LoginId;
            db = Database.getInstance();

            this.DataContext = new VIEWMODEL.MainWindowViewModel();
            InitializeComponent();

            this.Activate();
            //this.Close();
            SiteMgmtView siteMgmtView = new SiteMgmtView(this);

            menuItem_grid.Children.Add(siteMgmtView);

            /*SiteCautationView siteCautationView = new SiteCautationView(this);
             * menuItem_grid.Children.Add(siteCautationView);*/
        }