public void LoadCBB() { KhoaController khoaControll = new KhoaController(); _cbbkhoa.ItemsSource = khoaControll.GetAllKhoa; _cbbkhoa.DisplayMemberPath = "TenKhoa"; LopController lopControll = new LopController(); _cbblop.ItemsSource = lopControll.GetAllLop; _cbblop.DisplayMemberPath = "TenLop"; }
public frmKhoaLop() { InitializeComponent(); khoaControll = new KhoaController(); lopControll = new LopController(); LoadKTable(); LoadLTable(); if (App.Role.AddAll == true) { _btnaddK.IsEnabled = true; _btnaddL.IsEnabled = true; _btnaddK_cancel.IsEnabled = true; _btnaddL_cancel.IsEnabled = true; } else { if (App.Role.AddDocGia != true) { _btnaddK.IsEnabled = false; _btnaddL.IsEnabled = false; _btnaddK_cancel.IsEnabled = false; _btnaddL_cancel.IsEnabled = false; } } if (App.Role.EditAll == true) { _btnsaveK.IsEnabled = true; _btnsaveL.IsEnabled = true; } else { if (App.Role.EditDocGia != true) { _btnsaveK.IsEnabled = false; _btnsaveL.IsEnabled = false; } } if (App.Role.DeleteAll == true) { _btndeleteK.IsEnabled = true; _btndeleteL.IsEnabled = true; } else { if (App.Role.DeleteDocGia != true) { _btndeleteK.IsEnabled = false; _btndeleteL.IsEnabled = false; } } }