Search in sources :

Example 1 with TeacherServiceImpl

use of com.remswork.project.alice.service.impl.TeacherServiceImpl in project classify-system by anverliedoit.

the class LoginActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.login_activity);
    teacherService = new TeacherServiceImpl();
    teacherHelper = new TeacherHelper(getBaseContext());
    progressBar = (ProgressBar) findViewById(R.id.progressbar_login);
    screen = (FrameLayout) findViewById(R.id.white_screen_transparent);
    progressBar.setVisibility(View.INVISIBLE);
    screen.setVisibility(View.INVISIBLE);
}
Also used : TeacherHelper(com.lieverandiver.thesisproject.helper.TeacherHelper) TeacherServiceImpl(com.remswork.project.alice.service.impl.TeacherServiceImpl)

Example 2 with TeacherServiceImpl

use of com.remswork.project.alice.service.impl.TeacherServiceImpl in project classify-system by anverliedoit.

the class ActivityConfirmPassword method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_user_confirmpassword);
    btnConfirm = findViewById(R.id.activityt_confirmpassword_button);
    btnCancel = findViewById(R.id.activityt_confirmpassword_button_cancel);
    txPassword = findViewById(R.id.activity_confirmpassword_text);
    status = findViewById(R.id.message_status_confirm);
    teacherService = new TeacherServiceImpl();
    try {
        teacher = teacherService.getTeacherById(getIntent().getExtras().getLong("teacherId"));
    } catch (Exception e) {
        e.printStackTrace();
        teacher = new Teacher();
    }
    btnConfirm.setOnClickListener(this);
    btnCancel.setOnClickListener(this);
}
Also used : Teacher(com.remswork.project.alice.model.Teacher) TeacherServiceImpl(com.remswork.project.alice.service.impl.TeacherServiceImpl)

Example 3 with TeacherServiceImpl

use of com.remswork.project.alice.service.impl.TeacherServiceImpl in project classify-system by anverliedoit.

the class Teacher_Activity_Teacher_Profile method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    TeacherServiceImpl teacherService = new TeacherServiceImpl();
    Teacher teacher;
    try {
        teacher = teacherService.getTeacherById(getIntent().getExtras().getLong("teacherId"));
    } catch (Exception e) {
        e.printStackTrace();
        teacher = new Teacher();
    }
    setContentView(R.layout.teacher_activity_view_teacher_profile);
    txtvName = (TextView) findViewById(R.id.txtv_fullname);
    txtvDept = (TextView) findViewById(R.id.txtv_dept);
    buttonback = (Button) findViewById(R.id.add_backsubject);
    recyclerView = (RecyclerView) findViewById(R.id.recyclerview_view_subject);
    SubjectServiceImpl subjectService = new SubjectServiceImpl();
    SubjectAdapter subjectAdapter = null;
    try {
        subjectAdapter = new SubjectAdapter(this, subjectService.getSubjectListByTeacherId(teacher.getId()));
    } catch (SubjectException e) {
        e.printStackTrace();
    }
    LinearLayoutManager layoutManager = new LinearLayoutManager(this);
    recyclerView.setAdapter(subjectAdapter);
    recyclerView.setLayoutManager(layoutManager);
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    txtvName.setText(teacher.getFirstName() + " " + teacher.getMiddleName().substring(0, 1) + ". " + teacher.getLastName());
    txtvDept.setText(teacher.getDepartment() != null ? teacher.getDepartment().getName() : "None");
    buttonback.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View arg0) {
            finish();
        }
    });
}
Also used : SubjectServiceImpl(com.remswork.project.alice.service.impl.SubjectServiceImpl) Teacher(com.remswork.project.alice.model.Teacher) SubjectAdapter(com.lieverandiver.thesisproject.adapter.SubjectAdapter) SubjectException(com.remswork.project.alice.exception.SubjectException) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) View(android.view.View) SubjectException(com.remswork.project.alice.exception.SubjectException) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator) TeacherServiceImpl(com.remswork.project.alice.service.impl.TeacherServiceImpl)

Example 4 with TeacherServiceImpl

use of com.remswork.project.alice.service.impl.TeacherServiceImpl in project classify-system by anverliedoit.

the class ActivityChangePassword method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_user_changepassword);
    text1 = findViewById(R.id.activity_changepassword_text1);
    text2 = findViewById(R.id.activity_changepassword_text2);
    button = findViewById(R.id.activityt_changepassword_button);
    btnCancel = findViewById(R.id.activityt_changepassword_button_cancel);
    progressBar = findViewById(R.id.progressbar_cp);
    button.setOnClickListener(this);
    btnCancel.setOnClickListener(this);
    retrofit = new DI().getRetrofit();
    userService = retrofit.create(UserService.class);
    teacherService = new TeacherServiceImpl();
    progressBar.setVisibility(View.INVISIBLE);
    try {
        teacher = teacherService.getTeacherById(getIntent().getExtras().getLong("teacherId"));
    } catch (Exception e) {
        e.printStackTrace();
        teacher = new Teacher();
    }
}
Also used : DI(io.classify.DI) UserService(io.classify.service.UserService) Teacher(com.remswork.project.alice.model.Teacher) TeacherServiceImpl(com.remswork.project.alice.service.impl.TeacherServiceImpl)

Aggregations

TeacherServiceImpl (com.remswork.project.alice.service.impl.TeacherServiceImpl)4 Teacher (com.remswork.project.alice.model.Teacher)3 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)1 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)1 RecyclerView (android.support.v7.widget.RecyclerView)1 View (android.view.View)1 TextView (android.widget.TextView)1 SubjectAdapter (com.lieverandiver.thesisproject.adapter.SubjectAdapter)1 TeacherHelper (com.lieverandiver.thesisproject.helper.TeacherHelper)1 SubjectException (com.remswork.project.alice.exception.SubjectException)1 SubjectServiceImpl (com.remswork.project.alice.service.impl.SubjectServiceImpl)1 DI (io.classify.DI)1 UserService (io.classify.service.UserService)1