public DialogHocSinhViewModel(object hocsinhParameter)
 {
     GetListLop();
     hocsinh     = hocsinhParameter as HocSinh;
     lop         = ListLop.FirstOrDefault(p => p.MaLop == hocsinh.MaLop);
     CloseDialog = new RelayCommand <Window>((p) => true, OnClosingDialog);
     SaveHocSinh = new RelayCommand <object>((p) => true, OnSave);
 }
Esempio n. 2
0
        public DialogNhanVienModel(NhanVien nhanVienParameter)
        {
            GetListLop();
            GetListChucVu();
            lop    = ListLop.FirstOrDefault(p => p.MaLop == nhanVienParameter.MaLop);
            chucvu = ListChucVu.FirstOrDefault(p => p.MaChucVu == nhanVienParameter.MaChucVu);

            NhanVien     = nhanVienParameter;
            CloseDialog  = new RelayCommand <Window>((p) => true, onClosingDialog);
            SaveNhanVien = new RelayCommand <object>((p) => true, onSave);
        }