Пример #1
0
 IEnumerator Check()
 {
     if (InputUsername.text == "student" && InputPassword.text == "student")
     {
         Debug.Log("Hard forcing into student subsystem");
         SceneManager.LoadScene("Scenes/StudentSubsystem");
         yield break;
     }
     else if (InputUsername.text == "admin" && InputPassword.text == "admin")
     {
         Debug.Log("Hard forcing into admin subsystem");
         SceneManager.LoadScene("Scenes/AdminSubsystem");
         yield break;
     }
     if (dataInsert.CheckIfStudentExists(InputUsername.text))
     {
         Debug.Log("Checking Password - Current Password: "******"Success Loggin In!");
             SceneManager.LoadScene("Scenes/StudentSubsystem");
         }
         else
         {
             Debug.Log("Failed Logging on!");
         }
     }
 }
    private void CreateUser()
    {
        string usr = username.text;
        string pw  = password.text;

        if (usr.Equals("") || pw.Equals(""))
        {
            return;
        }
        if (!dataInsert.CheckIfStudentExists(usr))
        {
            dataInsert.InsertStudentGrade(usr, pw, 0, 0);
        }
    }