public WindowThemQuyenNhanVien(Data.QUYEN quyen, Data.Transit transit) { InitializeComponent(); mTransit = transit; BOQuyenNhanVien = new Data.BOQuyenNhanVien(transit); mQuyen = quyen; }
public WindowThemCaiDatChucNang(Data.QUYEN quyen, Data.Transit transit) { InitializeComponent(); mTransit = transit; BOChiTietQuyen = new Data.BOChiTietQuyen(mTransit); mQuyen = quyen; }
public WindowThemQuyenNhanVien(Data.QUYEN quyen, Data.Transit transit) { InitializeComponent(); mTransit = transit; BOQuyenNhanVien = new Data.BOQuyenNhanVien(transit); mQuyen = quyen; }
private void btnCaiDatChucNang_Click(object sender, RoutedEventArgs e) { if (lvData.SelectedItems.Count > 0) { Data.QUYEN item = (Data.QUYEN)lvData.SelectedItems[0]; WindowThemCaiDatChucNang win = new WindowThemCaiDatChucNang(item, mTransit); win.ShowDialog(); } }
private void btnQuyenNhanVien_Click(object sender, RoutedEventArgs e) { if (lvData.SelectedItems.Count > 0) { Data.QUYEN item = (Data.QUYEN)lvData.SelectedItems[0]; WindowThemQuyenNhanVien win = new WindowThemQuyenNhanVien(item, mTransit); win.ShowDialog(); } }
private void btnLuu_Click(object sender, RoutedEventArgs e) { if (CheckValues()) { if (_Item == null) { _Item = new Data.QUYEN(); _Item.Visual = true; _Item.Deleted = false; _Item.Edit = false; } GetValues(); DialogResult = true; } }
private void btnLuu_Click(object sender, RoutedEventArgs e) { if (CheckValues()) { if (_Item == null) { _Item = new Data.QUYEN(); _Item.Visual = true; _Item.Deleted = false; _Item.Edit = false; } GetValues(); DialogResult = true; } }
private void btnXoa_Click(object sender, RoutedEventArgs e) { if (lvData.SelectedItems.Count > 0) { if (lvData.SelectedItems.Count > 0) { Data.QUYEN item = (Data.QUYEN)lvData.SelectedItems[0]; if (item.MaQuyen > 0) { item.Deleted = true; } lsArray.Remove(item); lvData.Items.Refresh(); } } }
private void lvData_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (lvData.SelectedItems.Count > 0) { Data.QUYEN item = (Data.QUYEN)lvData.SelectedItems[0]; if (item.MaQuyen > 0) { btnQuyenNhanVien.Visibility = System.Windows.Visibility.Visible; btnCaiDatChucNang.Visibility = System.Windows.Visibility.Visible; } else { btnQuyenNhanVien.Visibility = System.Windows.Visibility.Hidden; btnCaiDatChucNang.Visibility = System.Windows.Visibility.Hidden; } } }