예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            RefundView rpt = new RefundView();

            rpt.Site = this.Site;
            return(rpt);
        }
        private void RefundViewbtn_Click(object sender, EventArgs e)
        {
            if (RefundViewrbtn.Checked == true)
            {
                BalloonKingdomDataSetTableAdapters.Rental_RefundTableAdapter rf = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.Rental_RefundTableAdapter();
                DataTable datatable = rf.View();

                RefundMasterlist rpt  = new RefundMasterlist();
                RefundView       view = new RefundView();
                view.SetDataSource(datatable);
                rpt.RefundViewAll(view);
                rpt.Show();
            }

            else
            {
                if (RefundCOFtxt.Text != "")
                {
                    int a = Convert.ToInt32(RefundCOFtxt.Text);
                    BalloonKingdomDataSetTableAdapters.Rental_RefundTableAdapter rf = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.Rental_RefundTableAdapter();
                    DataTable datatable = rf.Refund(a);

                    RefundMasterlist rpt  = new RefundMasterlist();
                    RefundView       view = new RefundView();
                    view.SetDataSource(datatable);
                    rpt.RefundViewAll(view);
                    rpt.Show();
                }

                else
                {
                    MessageBox.Show("Enter COF number first.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
 public void RefundViewAll(RefundView rpt)
 {
     crystalReportViewer1.ReportSource = rpt;
 }