Esempio n. 1
0
 private void btnluudl_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     addData(dlObj);
     if (txttendl.Text == "")
     {
         MessageBox.Show("Bạn chưa nhập đủ thông tin yêu cầu!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         if (flagLuu == 0)
         {
             if (dlCtrl.addData(dlObj))
             {
                 MessageBox.Show("Thêm thành công thông tin dung lượng!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             else
             {
                 MessageBox.Show("Không thêm được thông tin dung lượng!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
         else
         {
             if (dlCtrl.updData(dlObj))
             {
                 MessageBox.Show("Sửa thành công thông tin dung lượng!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             else
             {
                 MessageBox.Show("Không sửa được thông tin dung lượng!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
         frmDungLuong_Load(sender, e);
         DisEnl(false);
     }
 }