Exemple #1
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            reports frm  = new reports();
            MvtRpt  rpt  = new MvtRpt();
            MvtRpt  rpt2 = new MvtRpt();

            //rpt2.SetDataSource(db.mvtReport(2));
            // Set datasource first
            rpt2.SetParameterValue("@id", movement_header.id);
            frm.crystalReportViewer1.ReportSource = rpt2;
            frm.ShowDialog();
            btnPrint.Enabled = false;
        }
        private void metroButton1_Click(object sender, EventArgs e)
        {
            if (Mvt_number.Text.ToString() == "" || Cmb_stores.Text.ToString() == null || place.Text.ToString() == "" || reciever.Text.ToString() == "")
            {
                MessageBox.Show("لم يتم ادخال بيانات الأذن كاملة الرجاء مراجعة البيانات");
                return;
            }
            save();
            reports frm  = new reports();
            MvtRpt  rpt  = new MvtRpt();
            MvtRpt  rpt2 = new MvtRpt();

            //rpt2.SetDataSource(db.mvtReport(2));
            // Set datasource first
            rpt2.SetParameterValue("@id", movement_header.id);
            frm.crystalReportViewer1.ReportSource = rpt2;
            frm.ShowDialog();
            // btnPrint.Enabled = false;
        }