Ejemplo n.º 1
0
        public static int AdmNoExists2(int admno)
        {
            DbAccess db = new DbAccess();
            object c = db.ExecuteScalar("Select Count(*) from Student where AdmNo = '" + admno + "'");

            return (Convert.ToInt32(c));
             

        }
Ejemplo n.º 2
0
        public static bool AdmNoExists(int admno)//To check that admission number already exists or not
        {
            DbAccess db = new DbAccess();
            object c = db.ExecuteScalar("Select Count(*) from Student where AdmNo = '" + admno+ "'");

            if (Convert.ToInt32(c) == 0)
                return false;
            else
                return true;

        }