public void OnClickLoginButton()
        {
            string email    = emailTxtBox.getText();
            string password = passwordBox.getPassword();

            if (email == "" || password == "")
            {
                MessageBox.Show("Please fill all the fields", "Information", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            else
            {
                getController().callMethod("Login", email, password);
            }
        }
示例#2
0
        public void onUpdateButtonClick()
        {
            MessageBoxResult result;

            if (!nameTxtBox.getText().Equals("") && !phoneTxtBox.getText().Equals("") && !emailTxtBox.getText().Equals("") && !addressTxtBox.getText().Equals(""))
            {
                String        phoneNumber = "62" + phoneTxtBox.getText();
                ObjectBengkel newBengkel  = new ObjectBengkel(nameTxtBox.getText(), phoneNumber, emailTxtBox.getText(), addressTxtBox.getText());
                String        token       = File.ReadAllText(@"userToken.txt");
                String[]      password    = new String[2];
                if (!newPass.getPassword().ToString().Equals(""))
                {
                    password[0] = oldPass.getPassword();
                    password[1] = newPass.getPassword();
                }
                getController().callMethod("editProfile", uploadImage, password, newBengkel, token);
            }
            else
            {
                result = MessageBox.Show("All field must be filled !", "Failed", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
 public void onLoginButtonClick()
 {
     getController().callMethod("login", emailTxtBox.getText(), passwordTxtBox.getPassword());
 }