Esempio n. 1
0
        public void Succesful(string type)
        {
            switch (type)
            {
            case "brand":
                Solutec.Views.brands brand = new Solutec.Views.brands(this);
                primary_frame.NavigationService.Navigate(brand);
                break;

            case "user":
                Solutec.Views.users user = new Solutec.Views.users(this);
                primary_frame.NavigationService.Navigate(user);
                break;

            case "customer":
                Solutec.Views.customers customer = new Solutec.Views.customers(this);
                primary_frame.NavigationService.Navigate(customer);
                break;

            case "service":
                Solutec.Views.services service = new Solutec.Views.services(this);
                primary_frame.NavigationService.Navigate(service);
                break;
            }
        }
Esempio n. 2
0
        private void Services_btn_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Solutec.Views.blank blank = new Solutec.Views.blank();
            Grid grid = sender as Grid;

            //setStyleToButtons();

            if (CurrentButtonSelected != grid)
            {
                if (CurrentButtonSelected != null)
                {
                    CurrentButtonSelected.Background = Brushes.White;
                }
                CurrentButtonSelected = grid;
            }

            grid.Background = new SolidColorBrush(Color.FromArgb(99, 59, 183, 189));
            switch (grid.Name)
            {
            case "home_btn":
                home_txt.Text        = "Homepage";
                btnAction.Visibility = Visibility.Hidden;
                primary_frame.Source = new Uri("Views/home.xaml", UriKind.Relative);
                secondary_frame.NavigationService.Navigate(blank);
                break;

            case "services_btn":
                home_txt.Text        = "Servicios";
                btnAction.Visibility = Visibility.Visible;
                btnAction.Content    = "Registrar servicio";
                Solutec.Views.services service = new Solutec.Views.services(this);
                primary_frame.NavigationService.Navigate(service);
                secondary_frame.NavigationService.Navigate(blank);
                break;

            case "customers_btn":
                home_txt.Text        = "Clientes";
                btnAction.Visibility = Visibility.Visible;
                btnAction.Content    = "Registrar cliente";
                Solutec.Views.customers customer = new Solutec.Views.customers(this);
                primary_frame.NavigationService.Navigate(customer);
                secondary_frame.NavigationService.Navigate(blank);
                break;

            case "brands_btn":
                home_txt.Text = "Marcas";
                Solutec.Views.brands brand = new Solutec.Views.brands(this);
                primary_frame.NavigationService.Navigate(brand);
                secondary_frame.NavigationService.Navigate(blank);
                btnAction.Visibility = Visibility.Visible;
                btnAction.Content    = "Registrar marca";
                break;

            case "users_btn":
                home_txt.Text = "Usuarios";
                Solutec.Views.users user = new Solutec.Views.users(this);
                primary_frame.NavigationService.Navigate(user);
                secondary_frame.NavigationService.Navigate(blank);
                btnAction.Visibility = Visibility.Visible;
                btnAction.Content    = "Registrar usuario";
                break;
            }
        }