private void btnThemHD_Click(object sender, EventArgs e) { try { txtMaHD.Clear(); DTO_HoaDon hd = new DTO_HoaDon(txtMaHD.Text, cboTNV.SelectedValue.ToString(), cbo_TKH.SelectedValue.ToString(), txtTT.Text, DateTime.Parse(dateEdit1.DateTime.ToString()), txtSDT.Text, txtGhiChu.Text); bshd.InsertHoaDon(hd); XtraMessageBox.Show("Thêm thành công."); LoadData(); } catch { XtraMessageBox.Show("Thêm thất bại."); } }