protected void btnSua_Click(object sender, EventArgs e) { int csd; int csc; int dg; csd = Convert.ToInt16(txtChisocdau.Text); csc = Convert.ToInt16(txtChisocuoi.Text); dg = Convert.ToInt16(txtDongia.Text); int tthu; tthu = (csc - csd); txtTieuthu.Text = tthu.ToString(); Dien D = LayDuLieuTuForm(); DienDAO DienDAO = new DienDAO(); bool result = DienDAO.ChinhSua(D); if (result) { lblThongBao.Text = "Cập nhật thành công : " + D.NgayGhi; LayDuLieuTuGirdview(); } else { lblThongBao.Text = "Cập nhật không thành công, vui lòng kiểm tra lại"; } }