Пример #1
0
       private void txtReceiptNo_KeyPress(object sender, KeyPressEventArgs e)
       {
           if (e.KeyChar == 13)
           {
               Fee d = new Fee();
               DataSet ds = d.LoadStudentFeeByReceipt(txtReceiptNo.Text);
               if (ds.Tables[0].Rows.Count == 0)
               {
                   MessageBox.Show("Sorry No Report Exists");
               }
               else
               {
                   rptFeeReceipt rpt = new rptFeeReceipt();
                   rpt.SetDataSource(ds.Tables[0]);
                   this.rptv.ReportSource = rpt;

               }
           }
       }
Пример #2
0
       private void btnShow_Click(object sender, EventArgs e)

       {
           if (txtReceiptNo .Text == "")
           {
               MessageBox.Show("Enter Letter No.");
           }

               Fee d = new Fee();
               DataSet ds = d.LoadStudentFeeByReceipt(txtReceiptNo .Text);
               if (ds.Tables[0].Rows.Count == 0)
               {
                   MessageBox.Show("Sorry No Report Exists");
               }
               else
               {
                   rptFeeReceipt rpt = new rptFeeReceipt();
                   rpt.SetDataSource(ds.Tables[0]);
                   this.rptv.ReportSource = rpt;

               }
       }
Пример #3
0
       private void frmReportViewer_Load(object sender, EventArgs e)
       {
           txtReceiptNo.Text=receiptno.ToString();
           if ( txtReceiptNo.Text!="")
           {
               Fee d = new Fee();
               DataSet ds = d.LoadStudentFeeByReceipt(receiptno.ToString());
               if (ds.Tables[0].Rows.Count == 0)
               {
                   MessageBox.Show("Sorry No Report Exists");
               }
               else
               {
                   rptFeeReceipt rpt = new rptFeeReceipt();

                   rpt.SetDataSource(ds.Tables[0]);
                   this.rptv.ReportSource = rpt;

               }
           }
       }