Beispiel #1
0
 public DetailInforTeacherViewModel(INavigation _navigation, TeacherInfor teacherInfor)
 {
     Navigation    = _navigation;
     _teacherInfor = teacherInfor;
     if (_teacherInfor != null)
     {
         Name_Teacher     = _teacherInfor.Name_Teacher;
         Chucvu           = _teacherInfor.Chucvu;
         BirthDay_Teacher = _teacherInfor.BirthDay_Teacher;
         PhoneNumber      = _teacherInfor.PhoneNumber;
         Email            = _teacherInfor.Email;
         Address          = _teacherInfor.Address;
         ID_Teacher       = _teacherInfor.ID_Teacher;
         Password         = _teacherInfor.Password;
     }
 }
 public AddTeacherViewModel(INavigation _navigation, TeacherInfor teacherInfor)
 {
     Navigation    = _navigation;
     _teacherInfor = teacherInfor;
     if (_teacherInfor != null)
     {
         Name_Teacher     = _teacherInfor.Name_Teacher;
         Address          = _teacherInfor.Address;
         PhoneNumber      = _teacherInfor.PhoneNumber;
         BirthDay_Teacher = _teacherInfor.BirthDay_Teacher;
         //Chucvu = _teacherInfor.Chucvu;
         Email              = _teacherInfor.Email;
         Password           = _teacherInfor.Password;
         IsVisibleDeleteBtn = true;
         TeacherTittle      = "Sửa thông tin giáo viên";
     }
     else
     {
         TeacherTittle = "Thêm giáo viên";
     }
 }
 public EditTeacher(TeacherInfor teacherInfor)
 {
     InitializeComponent();
     BindingContext = new AddTeacherViewModel(Navigation, teacherInfor);
 }
 public DetaiinforTeacher(TeacherInfor teacherinfor)
 {
     InitializeComponent();
     BindingContext = new DetailInforTeacherViewModel(Navigation, teacherinfor);
     //BindingContext = new AddTeacherViewModel(Navigation, teacherinfor);
 }