Пример #1
0
        private void btnPhieuXuatBH_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (Kiemtra() == false)
            {
                return;
            }

            var r = new PhieuXuatKhoBH(data, data.PhieuDatHang.FirstOrDefault(), data.CTPhieuDatHang);

            r.ShowPreview();
        }
Пример #2
0
        private void btnInPhieuXuatBH_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var p = customGridView1.GetFocusedDataRow() as CRMData.PhieuDatHangRow;

            if (p == null)
            {
                return;
            }

            var ctAD = new CRMDataTableAdapters.CTPhieuDatHangTableAdapter();

            var spAD = new CRMDataTableAdapters.SanPhamTableAdapter();

            spAD.Fill(data.SanPham);

            var dtCT = ctAD.GetDataBySoPhieu(p.SoPhieu);
            var r    = new PhieuXuatKhoBH(data, p, dtCT);

            r.ShowPreview();
        }