コード例 #1
0
 int passwordCheck(LoginRegisterViewModel.CustomerSellerStage stage)
 {
     if (stage == LoginRegisterViewModel.CustomerSellerStage.Customer)
     {
         int balek = tbCustomerPasswordRegister.Password == "" ? 0 : tbCustomerPasswordRegister.Password == tbCustomerConfirmPasswordRegister.Password ? 1 : -1;
         return(balek);
     }
     else
     {
         int balek = tbSellerPasswordRegister.Password == "" ? 0 : tbSellerPasswordRegister.Password == tbSellerConfirmPasswordRegister.Password ? 1 : -1;
         return(balek);
     }
 }
コード例 #2
0
        private bool validatePasswordAndConfirmPassword(LoginRegisterViewModel.CustomerSellerStage e)
        {
            string pass, conpass;

            if (e == LoginRegisterViewModel.CustomerSellerStage.Customer)
            {
                pass    = tbCustomerPasswordRegister.Password;
                conpass = tbCustomerConfirmPasswordRegister.Password;
            }
            else
            {
                pass    = tbSellerPasswordRegister.Password;
                conpass = tbSellerConfirmPasswordRegister.Password;
            }
            return(pass == conpass);
        }