Пример #1
0
        private void btnInhoadon_Click(object sender, EventArgs e)//in hoa don
        {
            int             index = dtgvlistKH.CurrentRow.Index;
            string          id_HD = dtgvlistKH.Rows[index].Cells["id_HoaDon"].Value.ToString();
            DataTable       data  = dataProvider.GetDataTable("exec ReportHoaDon '" + id_HD + "'");
            HoaDonThanhToan TT    = new HoaDonThanhToan();

            TT.DataSource = data;
            TT.ShowPreviewDialog();
        }
Пример #2
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            string id_HD = dataProvider.ExcScalar("exec GetIdHDTheoSoBan " + TenBan.ToString()).ToString();

            dataProvider.exc("exec ThanhToan '" + id_HD + "'," + numKM.Value.ToString());
            DataTable       data = dataProvider.GetDataTable("exec ReportHoaDon '" + id_HD + "'");
            HoaDonThanhToan TT   = new HoaDonThanhToan();

            TT.DataSource = data;
            TT.ShowPreviewDialog();
            loadBan();
            listBillInfo.Items.Clear();
        }