Exemplo n.º 1
0
        private void HienThiDSCTHDDatagrid()
        {
            List <CTHD_DTO> lstCTHD = CTHD_BLL.LayDSCTHD();

            dataGridViewCTHD.DataSource = lstCTHD;



            dataGridViewCTHD.Columns["SMaHD"].HeaderText    = "Mã Hóa Đơn";
            dataGridViewCTHD.Columns["SMaHang"].HeaderText  = "Mã Hàng";
            dataGridViewCTHD.Columns["SSoLuong"].HeaderText = "Số Lương";
            dataGridViewCTHD.Columns["SDonGia"].HeaderText  = "Đơn Giá Bán";
            dataGridViewCTHD.Columns["SGiamGia"].HeaderText = "Giảm giá";



            dataGridViewCTHD.Columns["SMaHD"].Width    = 70;
            dataGridViewCTHD.Columns["SMaHang"].Width  = 100;
            dataGridViewCTHD.Columns["SSoLuong"].Width = 100;
            dataGridViewCTHD.Columns["SDonGia"].Width  = 150;
            dataGridViewCTHD.Columns["SGiamGia"].Width = 150;
        }
Exemplo n.º 2
0
        private void btnLamLai_Click(object sender, EventArgs e)
        {
            List <CTHD_DTO> lstCTHD = CTHD_BLL.LayDSCTHD();

            dataGridViewCTHD.DataSource = lstCTHD;
        }