private void frmThongKeTonKho_Load(object sender, EventArgs e)
 {
     GiaoDienCuaHang.DataLayer.HangHoaData hhdata = new GiaoDienCuaHang.DataLayer.HangHoaData();
     comboBox1.DataSource    = hhdata.LayDSHangHoa();
     comboBox1.DisplayMember = "TENHH";
     comboBox1.ValueMember   = "MAHH";
 }
Exemple #2
0
        private void buttonchon_Click_1(object sender, EventArgs e)
        {
            String dvt = comboBox1.SelectedValue.ToString();

            GiaoDienCuaHang.DataLayer.HangHoaData hh = new GiaoDienCuaHang.DataLayer.HangHoaData();
            CrystalReportChonhanghoa report          = new CrystalReportChonhanghoa();

            report.SetDataSource(hh.LayDSHangHoa(dvt));
            report.SetParameterValue("donvitinh", comboBox1.Text);


            crystalReportViewer1.ReportSource = report;
        }