Exemplo n.º 1
0
        /// <summary>
        /// Xử lý sự kiện thêm
        /// </summary>
        private void Them()
        {
            ucQuocGiaCT usercontrol = new ucQuocGiaCT();

            usercontrol.OnSavingComleted += new EventHandler(usercontrol_OnSavingComleted);
            Window frm = new Window();

            frm.Content = usercontrol;
            frm.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            frm.ShowDialog();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Xử lý sự kiện sửa
 /// </summary>
 private void Sua(bool bSua)
 {
     if (grDanhSach.SelectedItems.Count > 0 & grDanhSach.SelectedItems.Count < 2)
     {
         DataRow     dr          = (DataRow)grDanhSach.SelectedItems[0];
         ucQuocGiaCT usercontrol = new ucQuocGiaCT();
         usercontrol.LstChiTiet = dr;
         LoadFormCT dlgLoadFormCT = new LoadFormCT(usercontrol.LoadForm);
         dlgLoadFormCT(bSua);
         usercontrol.OnSavingComleted += new EventHandler(usercontrol_OnSavingComleted);
         Window frm = new Window();
         frm.Content = usercontrol;
         frm.WindowStartupLocation = WindowStartupLocation.CenterScreen;
         frm.ShowDialog();
     }
     else
     {
         LMessage.ShowMessage("M.DungChung.KhongDuocChonNhieu", LMessage.MessageBoxType.Warning);
         return;
     }
 }