Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            //For Receipt
            //SqlDataAdapter da = new SqlDataAdapter("Select TrNo,TType as FeeType,TDesc as Description,Amount as Amount from tbl_dailytransaction where TrNo=(Select isnull(max(TrNo),0) from tbl_dailytransaction)", d.con);
            //DataSet ds = new DataSet();
            //da.Fill(ds);
            //FeeCrystalReport1 fc = new FeeCrystalReport1();
            //fc.SetDataSource(ds.Tables[0]);
            FeeCollectionReprt fr = new FeeCollectionReprt();

            fr.Show();

            //Do balance coding
        }
Beispiel #2
0
        private void BtnReport_Click(object sender, EventArgs e)
        {
            SchoolManagement.dtp3 = datetime1.Value.ToShortDateString();

            SchoolManagement.dtp4 = dateTime2.Value.ToShortDateString();
            string         s  = "SELECT        Amount, BillNo, Feetype, Description, TranDate FROM tbl_FeesCollection where TranDate>='" + SchoolManagement.dtp3 + "'AND TranDate<= '" + SchoolManagement.dtp4 + "' ";
            SqlDataAdapter da = new SqlDataAdapter(s, d.con);
            DataSet        ds = new DataSet();

            da.Fill(ds);
            if (ds.Tables[0].Rows.Count >= 1)
            {
                FeeCollectionReprt fcr = new FeeCollectionReprt();
                fcr.Show();
            }
            else
            {
                MessageBox.Show("No transaction avialable between these two days", "Warning..", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }