Beispiel #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            PODate rpt = new PODate();

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        private void POViewbtn_Click(object sender, EventArgs e)
        {
            if (POViewrbtn.Checked == true)
            {
                BalloonKingdomDataSetTableAdapters.PurchaseTableAdapter po = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.PurchaseTableAdapter();
                DataTable datatable = po.GetPORec();

                PO_Masterlist rpt = new PO_Masterlist();

                POSuppName poname = new POSuppName();
                poname.SetDataSource(datatable);

                rpt.AssignPOName(poname);
                rpt.Show();
            }

            else if (PONobtn.Checked == true)
            {
                if ((PONofrmtxt.Text != "" && PONouptxt.Text == "") || (PONofrmtxt.Text == "" && PONouptxt.Text != "") || (PONofrmtxt.Text == "" && PONouptxt.Text == ""))
                {
                    MessageBox.Show("Enter po no. first", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }

                else
                {
                    int a = Convert.ToInt32(PONofrmtxt.Text);
                    int b = Convert.ToInt32(PONouptxt.Text);

                    BalloonKingdomDataSetTableAdapters.PurchaseTableAdapter purbegin = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.PurchaseTableAdapter();
                    DataTable datatable = purbegin.POFBeginEnd(a, b);

                    PO_Masterlist rpt   = new PO_Masterlist();
                    PONum         ponum = new PONum();
                    ponum.SetDataSource(datatable);

                    rpt.AssignPOReport(ponum);
                    rpt.Show();
                }
            }



            else
            {
                BalloonKingdomDataSetTableAdapters.PurchaseTableAdapter purend = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.PurchaseTableAdapter();
                DataTable datatable = purend.PODatebeginend(Convert.ToDateTime(POFrmpick.Value), Convert.ToDateTime(POUppick.Value));

                PO_Masterlist rpt    = new PO_Masterlist();
                PODate        podate = new PODate();
                podate.SetDataSource(datatable);

                rpt.AssignPODate(podate);
                rpt.Show();
            }
        }
 public void AssignPODate(PODate rpt)
 {
     crystalReportViewer1.ReportSource = rpt;
 }