Ejemplo n.º 1
0
        private async void doLogin(string studentID, string password)
        {
            //loading
            LoadingOverlay.Instance.showLoading(this);

            StudentList studentList = new StudentList();
            bool        loginStatus = await studentList.login(studentID, password);

            if (loginStatus)
            {
                //Get student profile from api
                LoadingOverlay.Instance.showLoading(this);
                Student std = await studentList.getById(studentID);

                if (std != null)
                {
                    AppParam.Instance.student = std;
                    this.showNext();
                }
                else
                {
                    //show register screen
                    this.doRegistration(studentID);
                }
                this.showNext();
            }
            else
            {
                AppParam.Instance.showAlertMessage("Login Status", "Student ID and Password are not match!");
            }
        }