public int countApplications()
    {
        int countProduct = -1;
        DataSet ds = new DataSet();
        try
        {
            SqlDataReader reader = null;
            using (DM dbManager = new DM())
            {
                dbManager.Command.CommandText = @"select count(id) from  StudentApplications where formfilled=1 and AdmissionGranted=0";


                //reader = dbManager.GetDataReader();
                // dbManager.LoadDataSet(ds);
                countProduct = dbManager.getScopeIdentity();
            }


        }
        catch (Exception exp)
        {

        }
        return countProduct;

    }
    public int getTransactionID_txtRef_depostiFOrm(string transactionnumber)
    {
        int id = -1;
        DataSet ds = new DataSet();
        try
        {

            using (DM dbManager = new DM())
            {
                dbManager.Command.CommandText = @"SELECT ID FROM eWalletPaymentdeposit_application where TransactionNo=@tnumber ";

                dbManager.Command.Parameters.AddWithValue("@tnumber", transactionnumber);

                id = Convert.ToInt32(dbManager.getScopeIdentity());
            }

        }
        catch (Exception exp)
        {

        }
        return id;
    }
    public int getCounteTransactionRows_User()
    {
        int countProduct = -1;
        DataSet ds = new DataSet();
        try
        {
            SqlDataReader reader = null;
            using (DM dbManager = new DM())
            {
                dbManager.Command.CommandText = @"select count(id) from eWallet_History where userID=@userid";

                dbManager.Command.Parameters.AddWithValue("@userid", Membership.GetUser().ProviderUserKey.ToString());
                //reader = dbManager.GetDataReader();
                // dbManager.LoadDataSet(ds);
                countProduct = dbManager.getScopeIdentity();
            }


        }
        catch (Exception exp)
        {

        }
        return countProduct;

    }
    public int getCountTableCBTSCHEDULE()
    {
        int countProduct = -1;
        DataSet ds = new DataSet();
        try
        {
            SqlDataReader reader = null;
            using (DM dbManager = new DM())
            {
                dbManager.Command.CommandText = @"select count(id) from CBT_Schedules";

                countProduct = dbManager.getScopeIdentity();
            }


        }
        catch (Exception exp)
        {

        }
        return countProduct;

    }
    public int getCountTransactionRows_User(string ewalletNumber)
    {
        int countProduct = -1;
        DataSet ds = new DataSet();
        try
        {
            SqlDataReader reader = null;
            using (DM dbManager = new DM())
            {
                dbManager.Command.CommandText = @"select count(id) from eWallet_History where ewalletNumber=@ewalletNumber ";

                dbManager.Command.Parameters.AddWithValue("@ewalletNumber", ewalletNumber);
                //reader = dbManager.GetDataReader();
                // dbManager.LoadDataSet(ds);
                countProduct = dbManager.getScopeIdentity();
            }


        }
        catch (Exception exp)
        {

        }
        return countProduct;

    }
    public int getCountTransactionRows_ALL()
    {
        int countProduct = -1;
        DataSet ds = new DataSet();
        try
        {
            SqlDataReader reader = null;
            using (DM dbManager = new DM())
            {
                dbManager.Command.CommandText = @"select count(id) from Transactionlog";


                //reader = dbManager.GetDataReader();
                // dbManager.LoadDataSet(ds);
                countProduct = dbManager.getScopeIdentity();
            }


        }
        catch (Exception exp)
        {

        }
        return countProduct;

    }