public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            LostCOFNo rpt = new LostCOFNo();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        private void RentalViewbtn_Click(object sender, EventArgs e)
        {
            if (RentalViewrbtn.Checked == true)
            {
                RentalCOFtxt.Text    = "";
                RentalCOFtxt.Enabled = false;

                BalloonKingdomDataSetTableAdapters.Rented_ItemsTableAdapter rent = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.Rented_ItemsTableAdapter();
                DataTable datatable = rent.RentView();

                RentalMasterlist rpt = new RentalMasterlist();

                LostCOFNo re = new LostCOFNo();
                re.SetDataSource(datatable);

                rpt.RentViewAll(re);
                rpt.Show();
            }

            else
            {
                if (RentalCOFtxt.Text != "")
                {
                    int a = Convert.ToInt32(RentalCOFtxt.Text);
                    BalloonKingdomDataSetTableAdapters.Rented_ItemsTableAdapter los = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.Rented_ItemsTableAdapter();
                    DataTable datatable = los.LostCOF(a);

                    RentalMasterlist rpt = new RentalMasterlist();

                    LostCOFNo re = new LostCOFNo();
                    re.SetDataSource(datatable);

                    rpt.RentViewAll(re);
                    rpt.Show();
                }

                else
                {
                    MessageBox.Show("Enter COF Number", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
        private void LostViewbtn_Click(object sender, EventArgs e)
        {
            if (LostViewrbtn.Checked == true)
            {
                LostQtytxt.Clear();
                LostItemtxt.Clear();
                LostQtytxt.Enabled  = false;
                LostItemtxt.Enabled = false;

                BalloonKingdomDataSetTableAdapters.InventoryTableAdapter lost = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.InventoryTableAdapter();
                DataTable datatable = lost.ViewLostQty();

                Lost_Item rpt = new Lost_Item();

                Lost lostit = new Lost();
                lostit.SetDataSource(datatable);

                rpt.AssignLost(lostit);

                rpt.Show();
            }

            else if (LostQtyrbtn.Checked == true)
            {
                if (LostQtytxt.Text != "")
                {
                    int a = Convert.ToInt32(LostQtytxt.Text);
                    BalloonKingdomDataSetTableAdapters.Rented_ItemsTableAdapter los = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.Rented_ItemsTableAdapter();
                    DataTable datatable = los.LostCOF(a);



                    Lost_Item rpt  = new Lost_Item();
                    LostCOFNo loss = new LostCOFNo();
                    loss.SetDataSource(datatable);


                    rpt.AssignCOF(loss);

                    rpt.Show();
                }

                else
                {
                    MessageBox.Show("Please enter COF Number", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            else

            {
                if (LostItemtxt.Text != "")
                {
                    int a = Convert.ToInt32(LostItemtxt.Text);
                    BalloonKingdomDataSetTableAdapters.InventoryTableAdapter lostitem = new WindowsApplication1.BalloonKingdomDataSetTableAdapters.InventoryTableAdapter();
                    DataTable datatable = lostitem.Itemid(a);


                    Lost_Item rpt   = new Lost_Item();
                    Lost      losts = new Lost();
                    losts.SetDataSource(datatable);

                    rpt.AssignLost(losts);

                    rpt.Show();
                }

                else
                {
                    MessageBox.Show("Please enter Item ID", "Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
示例#4
0
 public void AssignCOF(LostCOFNo rpt)
 {
     crystalReportViewer1.ReportSource = rpt;
 }
示例#5
0
        public void RentViewAll(LostCOFNo rpt)

        {
            crystalReportViewer1.ReportSource = rpt;
        }