Example #1
0
        private void On_Click_Info(object sender, RoutedEventArgs e)
        {
            Button b    = (Button)sender;
            var    name = b.DataContext.ToString();

            ScreenController.ControlVisibility(b.Name);
            GetDetailView(name);
        }
Example #2
0
        private void Btn_Action(object sender, RoutedEventArgs e)
        {
            Button        button = (Button)sender;
            List <string> names  = new List <string>();

            foreach (CheckBox item in boxes)
            {
                if (item.IsChecked.Value)
                {
                    string sub = item.Name.Substring(3);
                    names.Add(sub);
                }
            }
            GetProducts(names);
            ScreenController.ControlVisibility(button.Name);
        }
Example #3
0
        private void On_Click_SignIn(object sender, RoutedEventArgs e)
        {
            var userName = txtSignInName.Text;
            var pass     = txtSignInPass.Password;

            if (pass == "123" && userName == "admin")//buscar en base de datos
            {
                txtUser.Text             = userName;
                signInWarning.Visibility = Visibility.Hidden;
                //ScreenManager("btnHome");
                ScreenController.ControlVisibility("btnHome");
            }
            else
            {
                txtSignInName.Text       = "";
                txtSignInPass.Password   = "";
                signInWarning.Visibility = Visibility.Visible;
            }
        }
Example #4
0
        private void On_Click_LogIn(object sender, RoutedEventArgs e)
        {
            var email = txtEmailLogin.Text;
            var pass  = passLogIn.Password;

            if (user.IsRegistered(email, pass))//buscar en base de datos
            {
                MessageBox.Show("LOG-IN CORRECTO", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
                txtUser.Text             = email;
                signInWarning.Visibility = Visibility.Hidden;
                btnLogIn.Visibility      = Visibility.Hidden;
                ScreenController.ControlVisibility("btnHome");
                btnLogOut.Visibility = Visibility.Visible;
            }
            else
            {
                txtEmailLogin.Text      = "";
                passLogIn.Password      = "";
                LogInWarning.Visibility = Visibility.Visible;
            }
        }
Example #5
0
 private void On_Click_Back(object sender, RoutedEventArgs e)
 {
     ScreenDetail.Visibility = Visibility.Hidden;
     ScreenController.ControlVisibility("btnSearch");
 }