Пример #1
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     if (gridView3.GetDataRow(gridView3.FocusedRowHandle) != null)
     {
         DataTable dt       = ReportBLL.GetInstance().GetPurchaseReportData(gridView3.GetDataRow(gridView3.FocusedRowHandle)["id"].ToString().Trim());
         FrmPrint  frmPrint = new FrmPrint(new PurchaseXtraReport(base.CurrentUserOrgName + "采购单报表"), dt);
         frmPrint.ShowDialog();
     }
 }
Пример #2
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     if (gvInvoiceList.GetDataRow(gvInvoiceList.FocusedRowHandle) != null)
     {
         DataTable dt       = ReportBLL.GetInstance().GetInvoiceReportData(gvInvoiceList.GetDataRow(gvInvoiceList.FocusedRowHandle)["id"].ToString().Trim());
         FrmPrint  frmPrint = new FrmPrint(new InvoiceFromXtraReport(base.CurrentUserOrgName + "确认发货单报表"), dt);
         frmPrint.ShowDialog();
     }
 }
Пример #3
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     if (gVStockUp.GetDataRow(gVStockUp.FocusedRowHandle) != null)
     {
         DataTable dt       = ReportBLL.GetInstance().GetStokReportData(gVStockUp.GetDataRow(gVStockUp.FocusedRowHandle)["id"].ToString().Trim());
         FrmPrint  frmPrint = new FrmPrint(new StockXtraReport(base.CurrentUserOrgName + "备货单报表"), dt);
         frmPrint.Show();
     }
 }
Пример #4
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     if (gridView3.GetRow(gridView3.FocusedRowHandle) != null)
     {
         DataTable dt       = ReportBLL.GetInstance().GetOrderReportData(gridView3.GetDataRow(gridView3.FocusedRowHandle)["id"].ToString().Trim());
         FrmPrint  frmPrint = new FrmPrint(new OrderXtraReport(), dt);
         frmPrint.ShowDialog();
     }
 }
Пример #5
0
        private void BtnPrint_Click(object sender, EventArgs e)
        {
            if (this.gridView3.RowCount == 0)
            {
                return;
            }

            DataTable dt       = ReportBLL.GetInstance().GetPurchaseReportData(purchaseSaveModel.PurchaseId);
            FrmPrint  frmPrint = new FrmPrint(new PurchaseXtraReport(base.CurrentUserOrgName + "采购单报表"), dt);

            frmPrint.ShowDialog();
        }
Пример #6
0
 public UCtrlPaperSearch()
 {
     InitializeComponent();
     _frmPrint         = new FrmPrint();
     _frmPrintConfig   = new FrmPrintConfig();
     _frmMultiDownLoad = new FrmMultiDownLoad();
     _frmMultiDownLoad.AfterDownLoadSuccess += Print;
     _frmPrint.AfterSendToPrinter           += Print;
     uCtrlGridViewPager1.ActionNewPageSearch = PagerSearch;
     dgvContent.AutoGenerateColumns          = false;
     cboxStage.Items.Add("全部");
     cBoxMajor.Items.Add("全部");
     ClearCtrl();
 }
Пример #7
0
        /// <summary>
        /// 打印事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnPrint_Click(object sender, EventArgs e)
        {
            FrmPrint frmPrint;

            //库存商品
            if (xtraTabControl2.SelectedTabPage == xtraTabPage1)
            {
                frmPrint = new FrmPrint(new StockGoodXtraReport(base.CurrentUserOrgName + "库存商品报表"), ((DataView)bindingSource1.DataSource).Table);
            }
            else
            {
                frmPrint = new FrmPrint(new ConsumeGoodXtraReport(base.CurrentUserOrgName + "消耗品报表"), ((DataView)bindingSource2.DataSource).Table);
            }
            frmPrint.ShowDialog();
        }
Пример #8
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            List <DataGridViewRow> rowSelect = new List <DataGridViewRow>();

            foreach (DataGridViewRow row in dgvContent.Rows)
            {
                if (row.Cells[0].Value != null)
                {
                    bool bChecked = Convert.ToBoolean(row.Cells[0].Value);
                    if (bChecked)
                    {
                        rowSelect.Add(row);
                    }
                }
            }

            if (rowSelect.Count == 0)
            {
                MessageBox.Show("请选择要打印的行");
                return;
            }

            #region 打印部分发送打印界面
            List <FrmPrint.MutltiPrintData> dataList = new List <FrmPrint.MutltiPrintData>();
            foreach (DataGridViewRow row in rowSelect)
            {
                FrmPrint.MutltiPrintData data = new FrmPrint.MutltiPrintData();
                data.ID          = row.Cells["colID"].Value.ToSafeString();
                data.ProductName = row.Cells["colProductName"].Value.ToSafeString();
                data.Count       = 1;
                //TODO
                //data.FileName =
                data.IsPrinted  = false;
                data.PaperSize  = row.Cells["colPaperSize"].Value.ToSafeString();
                data.PdfFile    = row.Cells["colPdfFile"].Value.ToSafeString();
                data.PlotFile   = row.Cells["colPlotFile"].Value.ToSafeString();
                data.IsVertical = Convert.ToBoolean(row.Cells["colIsVertical"].Value);
                dataList.Add(data);
            }
            FrmPrint     frmConfig = _frmPrint;
            DialogResult dr        = frmConfig.ShowDialog(dataList);
            #endregion
        }
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            FrmPrint frmPrint = new FrmPrint(new PurchaseCommeraceXtraReport(base.CurrentUserOrgName + "采购商品查询报表"), ((DataView)this.bindingSource1.DataSource).Table);

            frmPrint.ShowDialog();
        }
Пример #10
0
        protected override void PerformPrint()
        {
            var rpt = new Report.Rpt_TariffFixed
            {
                DataSource = _dtb,
                Name = String.Format("{0}{1:_dd.MM.yyyy_HH.mm.ss}_bg",
                Global.Session.User.Acc, Global.Session.Current)
            };

            rpt.parTitle1.Value = Global.Title1;
            rpt.parTitle2.Value = Global.Title2;
            rpt.parDate.Value = Global.Session.Current;
            rpt.parDate.Value = Global.Session.Current;
            rpt.parUserOut.Value = Global.Session.User.Name;

            var frm = new FrmPrint();
            frm.SetReport(rpt);
            frm.WindowState = FormWindowState.Maximized;
            frm.ShowDialog();

            base.PerformPrint();
        }
Пример #11
0
        protected override void PerformPrint()
        {
            var dlg = new FrmRevenueNormal();
            var res = dlg.ShowDialog();

            decimal sum = 0;
            var fr = dteFrom.DateTime;
            var to = dteTo.DateTime;
            var frm = new FrmPrint();

            switch (res)
            {
                case DialogResult.OK: // bảng kê xe tải lưu đậu
                    var tb = _bll.Tra_Detail.GetRevenueNormal(out sum, fr, to, DAL.Tra_DetailDAL.Group.A);

                    var rpt1 = new Report.Rpt_RevenueNormal1
                    {
                        Name = String.Format("{0}{1:_dd.MM.yyyy_HH.mm.ss}_n1",
                        Global.Session.User.Acc, Global.Session.Current),
                        DataSource = tb
                    };

                    rpt1.parTitle1.Value = Global.Title1;
                    rpt1.parTitle2.Value = Global.Title2;
                    rpt1.parUserOut.Value = Global.Session.User.Name;
                    rpt1.parDate.Value = to;
                    rpt1.xrcWatch.Text = String.Format("{0:HH:mm} - {1:HH:mm}", fr, to);
                    rpt1.xrcMoney.Text = sum.ToVietnamese("đồng");

                    frm.Text = String.Format("In: {0} - Số tiền: {1:#,0}", Text, sum);
                    frm.SetReport(rpt1);
                    break;

                case DialogResult.Yes: // bảng kê xe sang hàng
                    tb = _bll.Tra_Detail.GetRevenueNormal(out sum, fr, to, DAL.Tra_DetailDAL.Group.B);

                    var rpt2 = new Report.Rpt_RevenueNormal2
                    {
                        Name = String.Format("{0}{1:_dd.MM.yyyy_HH.mm.ss}_n2",
                        Global.Session.User.Acc, Global.Session.Current),
                        DataSource = tb
                    };

                    rpt2.parTitle1.Value = Global.Title1;
                    rpt2.parTitle2.Value = Global.Title2;
                    rpt2.parUserOut.Value = Global.Session.User.Name;
                    rpt2.parDate.Value = to;
                    rpt2.xrcWatch.Text = String.Format("{0:HH:mm} - {1:HH:mm}", fr, to);
                    rpt2.xrcMoney.Text = sum.ToVietnamese("đồng");

                    frm.Text = String.Format("In: {0} - Số tiền: {1:#,0}", Text, sum);
                    frm.SetReport(rpt2);
                    break;

                case DialogResult.No: // bảng kê xe khách vãng lai
                    tb = _bll.Tra_Detail.GetRevenueNormal(out sum, fr, to, DAL.Tra_DetailDAL.Group.C);

                    var rpt3 = new Report.Rpt_RevenueNormal3
                    {
                        Name = String.Format("{0}{1:_dd.MM.yyyy_HH.mm.ss}_n2",
                        Global.Session.User.Acc, Global.Session.Current),
                        DataSource = tb
                    };

                    rpt3.parTitle1.Value = Global.Title1;
                    rpt3.parTitle2.Value = Global.Title2;
                    rpt3.parUserOut.Value = Global.Session.User.Name;
                    rpt3.parDate.Value = to;
                    rpt3.xrcWatch.Text = String.Format("{0:HH:mm} - {1:HH:mm}", fr, to);
                    rpt3.xrcMoney.Text = sum.ToVietnamese("đồng");

                    frm.Text = String.Format("In: {0} - Số tiền: {1:#,0}", Text, sum);
                    frm.SetReport(rpt3);
                    break;

                case DialogResult.Cancel: // báo cáo
                    tb = _bll.Tra_Detail.SumaryReportNormal(out sum, fr, to);

                    var rpt4 = new Report.Rpt_ReportNormal
                    {
                        Name = String.Format(Level1.STR_DT,
                        Global.Session.User.Acc, Global.Session.Current),
                        DataSource = tb
                    };

                    var sub1 = new Report.Rpt_ReportNormal1() { DataSource = tb };
                    rpt4.xrSubreport1.ReportSource = sub1;

                    var sub2 = new Report.Rpt_ReportNormal2() { DataSource = tb };
                    rpt4.xrSubreport2.ReportSource = sub2;

                    rpt4.parTitle1.Value = Global.Title1;
                    rpt4.parTitle2.Value = Global.Title2;
                    rpt4.parNum.Value = Global.AuditNumber;
                    rpt4.parDate.Value = to;
                    rpt4.parTotal.Value = sum;
                    rpt4.parUserOut.Value = Global.Session.User.Name;

                    var count = tb.Compute("Sum(CountFullDay)", "").ToInt32()
                        + tb.Compute("Sum(CountHalfDay)", "").ToInt32();

                    var vote = tb.Compute("Sum(FullDay)", "").ToInt32()
                        + tb.Compute("Sum(HalfDay)", "").ToInt32();

                    rpt4.parCount.Value = tb == null ? 0 : count;
                    rpt4.parFullDay.Value = tb == null ? 0 : vote;

                    var duration = "(Từ {0} ngày {1} đến {2} ngày {3})";
                    duration = String.Format(duration,
                      fr.ToStringTimeVN(), fr.ToStringDateVN(),
                      to.ToStringTimeVN(), to.ToStringDateVN());
                    rpt4.xrlFromTo.Text = duration;

                    frm.Text = String.Format("In: {0} - Số tiền: {1:#,0}", Text, sum);
                    frm.SetReport(rpt4);
                    break;
            }

            frm.WindowState = FormWindowState.Maximized;
            frm.ShowDialog();

            base.PerformPrint();
        }
Пример #12
0
        protected override void PerformPrint()
        {
            var oki = XtraMessageBox.Show(STR_CFM,
                Level1.STR_PRINT, MessageBoxButtons.YesNo);

            var receipt = "";
            var frm = new FrmPrint();
            decimal sum = 0;

            DateTime fr, to;
            Session.CutShiftMonth(dteMonth.DateTime, out fr, out to);

            if (oki == DialogResult.Yes)
            {
                var rpt = new Report.Rpt_ReportFixed
                {
                    Name = String.Format(Level1.STR_DT,
                    Global.Session.User.Acc, Global.Session.Current),
                    DataSource = _bll.Tra_Detail.GetRevenueFixed(out sum, out receipt, fr, to)
                };

                rpt.parTitle1.Value = Global.Title1;
                rpt.parTitle2.Value = Global.Title2;
                rpt.parAddress.Value = Global.Address;
                rpt.parTaxcode.Value = Global.Taxcode;
                rpt.xrlTitle.Text = String.Format(rpt.xrlTitle.Text,
                    fr.ToStringDateVN(), to.ToStringDateVN());

                var duration = "(Từ {0} ngày {1} đến {2} ngày {3})";
                duration = String.Format(duration,
                  fr.ToStringTimeVN(), fr.ToStringDateVN(),
                  to.ToStringTimeVN(), to.ToStringDateVN());

                rpt.xrlFromTo.Text = duration;
                frm.SetReport(rpt);
            }
            else
            {
                var rpt4 = new Report.Rpt_AuditMonthSgtvt
                {
                    Name = String.Format("{0}{1:_dd.MM.yyyy_HH.mm.ss}_tdt",
                    Global.Session.User.Acc, Global.Session.Current)
                };

                rpt4.DataSource = _bll.Tra_Detail.AuditMonthFixedSgtvt(fr, to);
                rpt4.xrlTitle.Text += dteMonth.DateTime.ToString(" MM/yyyy");

                rpt4.parTitle1.Value = Global.Title1;
                rpt4.parTitle2.Value = Global.Title2;
                rpt4.parNum.Value = Global.AuditNumber;
                rpt4.parDate.Value = Global.Session.Current;
                frm.SetReport(rpt4);
            }

            frm.WindowState = FormWindowState.Maximized;
            frm.ShowDialog();

            base.PerformPrint();
        }
        private void btnPrint_Click(object sender, EventArgs e)
        {
            FrmPrint frmPrint = new FrmPrint(new OOSQueryXtraReport(base.CurrentUserOrgName + "缺货查询报表"), base.cachedDataView.Table);

            frmPrint.ShowDialog();
        }
Пример #14
0
        /// <summary>
        /// In bảng kê và báo cáo xe cố định từ 13:00 hôm trước đến 13:00 hôm nay
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdSumaryFixed_Click(object sender, EventArgs e)
        {
            var oki = XtraMessageBox.Show(Level1.STR_CFM,
                Level1.STR_PRINT, MessageBoxButtons.YesNo);

            var receipt = "";
            DateTime fr, to;
            Session.CutShiftDay(Global.Session.Current, out fr, out to);

            decimal _sum = 0;
            var tb = _bll.Tra_Detail.GetRevenueFixed(out _sum, out receipt, fr, to);
            var frm = new FrmPrint() { Text = String.Format("In: {0} - Số tiền: {1:#,#}", Text, _sum) };

            if (oki == DialogResult.Yes)
            {
                var rpt = new Report.Rpt_ReportFixed
                {
                    Name = String.Format(Level1.STR_DT,
                    Global.Session.User.Acc, Global.Session.Current),
                    DataSource = tb
                };

                rpt.parTitle1.Value = Global.Title1;
                rpt.parTitle2.Value = Global.Title2;
                rpt.parAddress.Value = Global.Address;
                rpt.parTaxcode.Value = Global.Taxcode;
                rpt.xrlTitle.Text = String.Format(rpt.xrlTitle.Text,
                    fr.ToStringDateVN(), to.ToStringDateVN());

                var duration = "(Từ {0} ngày {1} đến {2} ngày {3})";
                duration = String.Format(duration,
                  fr.ToStringTimeVN(), fr.ToStringDateVN(),
                  to.ToStringTimeVN(), to.ToStringDateVN());

                rpt.xrlFromTo.Text = duration;
                frm.SetReport(rpt);
            }
            else
            {
                var rpt = new Report.Rpt_RevenueFixed
                {
                    Name = String.Format(Level1.STR_DT,
                    Global.Session.User.Acc, Global.Session.Current),
                    DataSource = tb
                };

                rpt.parTitle1.Value = Global.Title1;
                rpt.parTitle2.Value = Global.Title2;
                rpt.parAddress.Value = Global.Address;
                rpt.parTaxcode.Value = Global.Taxcode;
                rpt.parDate.Value = to;

                //rpt.xrlCashier.Text = Global.Session.User.Name;
                //rpt.xrcMoney.Text = _sum.ToVietnamese("đồng");
                //rpt.xrlSophieu.Text = "Số phiếu: " + receipt;

                var duration = "(Từ {0} ngày {1} đến {2} ngày {3})";
                duration = String.Format(duration,
                  fr.ToStringTimeVN(), fr.ToStringDateVN(),
                  to.ToStringTimeVN(), to.ToStringDateVN());

                rpt.xrlFromTo.Text = duration;
                frm.SetReport(rpt);
            }

            frm.WindowState = FormWindowState.Maximized;
            frm.ShowDialog();
        }
Пример #15
0
        /// <summary>
        /// In bảng kê nhóm 1 - xe tải lưu đậu nhóm xe vãng lai
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdPrintIngate_Click(object sender, EventArgs e)
        {
            var rpt = new Report.Rpt_IngateMaster
            {
                Name = String.Format("{0}{1:_dd.MM.yyyy_HH.mm.ss}_tb",
                Global.Session.User.Acc, Global.Session.Current)
            };

            rpt.parTitle1.Value = Global.Title1;
            rpt.parTitle2.Value = Global.Title2;
            rpt.parDate.Value = Global.Session.Current;

            var tb = _bll.Tra_Detail.GetInDepotFixed();
            tb.Numbered();
            var sub = new Report.Rpt_Ingate() { DataSource = tb };
            rpt.xrSubreport1.ReportSource = sub;

            tb = _bll.Tra_Detail.GetInDepotNormal();
            tb.Numbered();
            sub = new Report.Rpt_Ingate() { DataSource = tb };
            rpt.xrSubreport2.ReportSource = sub;

            rpt.parDate.Value = Global.Session.Current;
            rpt.parUserOut.Value = Global.Session.User.Name;

            var frm = new FrmPrint();
            frm.SetReport(rpt);

            frm.WindowState = FormWindowState.Maximized;
            frm.ShowDialog();
        }
Пример #16
0
        protected override void PerformPrint()
        {
            var oki = XtraMessageBox.Show(Level1.STR_CFM,
                Level1.STR_PRINT, MessageBoxButtons.YesNo);

            var receipt = "";
            var to = dteTo.DateTime.Date.AddTicks(Global.CutsFr.Ticks);
            var fr = dteFrom.DateTime.Date.AddTicks(Global.CutsFr.Ticks).AddSeconds(1);

            var tb = _bll.Tra_Detail.GetRevenueFixed(out _sum, out receipt, fr, to);
            var frm = new FrmPrint() { Text = String.Format("In: {0} - Số tiền: {1:#,#}", Text, _sum) };

            if (oki == DialogResult.Yes)
            {
                var rpt = new Report.Rpt_ReportFixed
                {
                    Name = String.Format(Level1.STR_DT,
                    Global.Session.User.Acc, Global.Session.Current),
                    DataSource = tb
                };

                rpt.parTitle1.Value = Global.Title1;
                rpt.parTitle2.Value = Global.Title2;
                rpt.parAddress.Value = Global.Address;
                rpt.parTaxcode.Value = Global.Taxcode;
                rpt.xrlTitle.Text = String.Format(rpt.xrlTitle.Text,
                    fr.ToStringDateVN(), to.ToStringDateVN());

                var duration = "(Từ {0} ngày {1} đến {2} ngày {3})";
                duration = String.Format(duration,
                  fr.ToStringTimeVN(), fr.ToStringDateVN(),
                  to.ToStringTimeVN(), to.ToStringDateVN());

                rpt.xrlFromTo.Text = duration;
                frm.SetReport(rpt);
            }
            else
            {
                var rpt = new Report.Rpt_RevenueFixed
                {
                    Name = String.Format(Level1.STR_DT,
                    Global.Session.User.Acc, Global.Session.Current),
                    DataSource = tb
                };

                rpt.parTitle1.Value = Global.Title1;
                rpt.parTitle2.Value = Global.Title2;
                rpt.parAddress.Value = Global.Address;
                rpt.parTaxcode.Value = Global.Taxcode;
                rpt.parDate.Value = to;

                //rpt.xrlCashier.Text = Global.Session.User.Name;
                //rpt.xrcMoney.Text = _sum.ToVietnamese("đồng");
                //rpt.xrlSophieu.Text = "Số phiếu: " + receipt;

                var duration = "(Từ {0} ngày {1} đến {2} ngày {3})";
                duration = String.Format(duration,
                  fr.ToStringTimeVN(), fr.ToStringDateVN(),
                  to.ToStringTimeVN(), to.ToStringDateVN());

                rpt.xrlFromTo.Text = duration;
                frm.SetReport(rpt);
            }

            frm.WindowState = FormWindowState.Maximized;
            frm.ShowDialog();

            base.PerformPrint();
        }
        private void sbPrint_Click(object sender, EventArgs e)
        {
            FrmPrint frmPrint = new FrmPrint(new QueryOrderItemXtraReport(base.CurrentUserOrgName + "订单商品查询报表"), base.cachedDataView.Table);

            frmPrint.ShowDialog();
        }
Пример #18
0
        protected override void PerformPrint()
        {
            var rpt = new Report.Rpt_DebtMonth
            {
                Name = String.Format("{0}{1:_dd.MM.yyyy_HH.mm.ss}_cnt",
                Global.Session.User.Acc, Global.Session.Current)
            };

            DateTime fr, to;
            Session.CutShiftMonth(dteMonth.DateTime, out fr, out to);

            rpt.DataSource = _bll.Tra_Detail.DebtMonthFixed(fr, to,
                chkHideActive.Checked);
            rpt.xrlCashier.Text = Global.Session.User.Name;
            rpt.xrlTitle.Text += dteMonth.DateTime.ToString(" MM/yyyy");
            rpt.xrlThuchien.Text += dteMonth.DateTime.ToString(" MM/yyyy");

            rpt.parTitle1.Value = Global.Title2;
            rpt.parTitle2.Value = Global.Title3;
            rpt.parDate.Value = Global.Session.Current;

            var frm = new FrmPrint();
            frm.SetReport(rpt);
            frm.WindowState = FormWindowState.Maximized;
            frm.ShowDialog();

            base.PerformPrint();
        }