private void cboPhieuNhap_TextChanged(object sender, EventArgs e) { try { txtMaPN.Text = cboPhieuNhap.Text; BLL_DAL.PHIEU_NHAP p = pn.TimPhieuNhapTheoMaPN(txtMaPN.Text); if (p != null) { cboNhaCungCap.SelectedValue = p.MaNCC; cboNhanVien.SelectedValue = p.MaNV; dtmThoiGian.Value = (DateTime)p.ThoiGian; txtTongTien.Text = p.TongTien + ""; txtGiamGia.Text = p.GiamGia + ""; txtTongTien.Text = ctpn.TinhTongTien(txtMaPN.Text) + ""; } loadCTPN(cboPhieuNhap.SelectedValue.ToString()); //txtTongTien.Text = ctpn.TinhTongTien(cboPhieuNhap.SelectedValue.ToString()) + ""; } catch (Exception) { } }