예제 #1
0
 private void btnLuuSua_Click(object sender, EventArgs e)
 {
     if (txtNoiDungQDMoi.Text!="" && combQuyDinh.SelectedIndex>=0)
     {
         QuyDinh quyDinh = DanhSachQD[combQuyDinh.SelectedIndex];
         quyDinh.NoiDungQuyDinh = txtNoiDungQDMoi.Text;
         QuyDinhDAO adapterQD = new QuyDinhDAO();
         if (adapterQD.ThayDoiQuyDinh(quyDinh))
         {
             MessageBox.Show("Đã cập nhật!");
             txtNoiDungQDMoi.Clear();
             lbQuyDinhCu.Text = quyDinh.NoiDungQuyDinh;
         }
         else
         {
             MessageBox.Show("Hệ thống bị lỗi!");
         }
     }
     else
     {
         MessageBox.Show("Bạn chưa nhập đầy đủ thông tin!");
     }
 }