Exemple #1
0
        private void LoadData()
        {
            dgvHang.DataSource = bll.GetHangHoa(txtMaHH.Text, txtTenHH.Text);
            dgvHang.AutoResizeColumns();

            dgvHangMua.DataSource = bll.GetTableHangMua(hangmua);
            dgvHangMua.AutoResizeColumns();
            if (string.IsNullOrEmpty(txtMaKH.Text.Trim()))
            {
                txtTong.Text = bll.TinhTongTien(hangmua).ToString();
            }
            else
            {
                txtTong.Text = bll.TinhTongTien(Convert.ToInt32(txtMaKH.Text), hangmua).ToString();
            }
        }