Esempio n. 1
0
        private void btnTaoEvent_Click(object sender, RoutedEventArgs e)
        {
            ThaoTacSuKien ttsk = new ThaoTacSuKien(NguoiDungING, cnLich.DateTimeCurrent);

            ttsk.ShowDialog();
            LoadSuKienToLich();
            LoadPhanLoaiSuKien();
        }
        private void Click_btnSua(object sender, RoutedEventArgs e)
        {
            if (dataGirdDSSuKien.SelectedIndex >= 0)
            {
                SuKien sk = (SuKien)dataGirdDSSuKien.SelectedItem;
                SuKien skSua;
                using (QuanLyDuLieu db = new QuanLyDuLieu())
                {
                    skSua = db.SuKien.ToList().Find(m => m.SuKienID == sk.SuKienID);
                }

                ThaoTacSuKien ttsk = new ThaoTacSuKien(NguoiDungING, skSua);
                ttsk.ShowDialog();
                ListSuKienING = DateSuKien(NgayING);
            }
        }