Beispiel #1
0
        private void crpPrint_Load(object sender, EventArgs e)
        {
            //dt.Columns.Add("ProName", typeof(string));
            //dt.Columns.Add("ProQty", typeof(int));
            //dt.Columns.Add("ProPrice", typeof(double));
            //dt.Columns.Add("ProPayment", typeof(double));

            //dt.Rows.Add("iphone7", 2, 1000, 2000);
            //dt.Rows.Add("iphone7", 2, 1000, 2000);
            //dt.Rows.Add("iphone7", 2, 1000, 2000);
            //dt.Rows.Add("iphone7", 2, 1000, 2000);
            ReportInvoice rp = new ReportInvoice();

            rp.Database.Tables["SaleProduct"].SetDataSource(dt);
            crpPrint.ReportSource = null;
            crpPrint.ReportSource = rp;
        }
Beispiel #2
0
        private void bbi_Print_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            InvoiceOwnerDTO oRow = (InvoiceOwnerDTO)gcv_Invoice.GetFocusedRow();

            if (oRow != null)
            {
                var trans = _repository.Run <InvoiceService, List <InvoiceTransDTO> >(x => x.Get_Edit_List_Trans(oRow.RecId));
                CTransactionsDTO             cTransactions = _currentTransactionsList.FirstOrDefault(x => x.CurID == oRow.CariRecId);
                List <ReportInvoiceTransDTO> reportTrans   = new List <ReportInvoiceTransDTO>();
                foreach (var item in trans)
                {
                    reportTrans.Add(new ReportInvoiceTransDTO
                    {
                        ProductName = AppMain.Products.FirstOrDefault(x => x.PID == item.ProductId).PName,
                        Tutar       = item.Tutar,
                        Unit        = item.Quentity + " " + _list_UnitsDTO.FirstOrDefault(x => x.UID == item.UnitID.GetValueOrDefault()).UName,
                        PTax        = item.KDVPrice
                    });
                }

                ReportInvoice reportInvoice = new ReportInvoice
                {
                    CustomerName    = cTransactions.CurAccountName,
                    CustomerAddress = cTransactions.CurAdress,
                    CustomerCity    = cTransactions.CurCity,
                    CustomerCountry = cTransactions.CurCountryName,
                    FaturaNo        = oRow.FicheDocumentNo,
                    FichDate        = oRow.FicDate.GetValueOrDefault(),
                    InvoiceType     = oRow.InvoiceType.GetValueOrDefault(),
                    trans           = reportTrans
                };


                frmPrint frm = new frmPrint();
                frm.PrintInvoiceReport(oRow, reportTrans, cTransactions, reportInvoice);
                frm.ShowDialog();
            }
        }
Beispiel #3
0
        private void toolStripMenuItem5_Click(object sender, EventArgs e)
        {
            ReportInvoice invoice = new ReportInvoice(txtInvoiceId.Text);

            invoice.ShowDialog();
        }
Beispiel #4
0
 public void InitData(InvoiceOwnerDTO saleOwners, List <ReportInvoiceTransDTO> List_InvoiceTrans, CTransactionsDTO cTransactions, ReportInvoice reports)
 {
     objectDataSource1.DataSource = saleOwners;
     objectDataSource2.DataSource = List_InvoiceTrans;
     objectDataSource3.DataSource = cTransactions;
     objectDataSource4.DataSource = reports;
 }
Beispiel #5
0
        public void PrintInvoiceReport(InvoiceOwnerDTO InvoiceOwner, List <ReportInvoiceTransDTO> reportInvoiceTrans, CTransactionsDTO cTransactions, ReportInvoice reports)
        {
            InvoiceReport_Sablon1 report = new InvoiceReport_Sablon1();

            foreach (DevExpress.XtraReports.Parameters.Parameter p in report.Parameters)
            {
                p.Visible = false;
            }
            report.InitData(InvoiceOwner, reportInvoiceTrans, cTransactions, reports);
            documentViewer1.DocumentSource = report;
            report.CreateDocument();
        }