public static List <Etudiant> GetAllStudent()
        {
            var             db         = SqliteDB.connect();
            List <Etudiant> allStudent = db.Table <Etudiant>().OrderBy(x => x.Id).ToList();

            db.Close();
            return(allStudent);
        }
        public static void Insert(string nom)
        {
            var db        = SqliteDB.connect();
            var newLesson = new Lesson();

            newLesson.Nom = nom;
            db.Insert(newLesson);
            db.Close();
        }
Ejemplo n.º 3
0
        public static void Insert(string username, string password, string email)
        {
            var db            = SqliteDB.connect();
            var newProfesseur = new Professeur();

            newProfesseur.Username = username;
            newProfesseur.Password = password;
            newProfesseur.Email    = email;
            db.Insert(newProfesseur);
            db.Close();
        }
        public static void Insert(int cne, string nom, string prenom, string email, string tele, string filiere)
        {
            var db          = SqliteDB.connect();
            var newEtudiant = new Etudiant();

            newEtudiant.Cne       = cne;
            newEtudiant.Nom       = nom;
            newEtudiant.Prenom    = prenom;
            newEtudiant.Email     = email;
            newEtudiant.Telephone = tele;
            newEtudiant.Filiere   = filiere;
            db.Insert(newEtudiant);
            db.Close();
        }
Ejemplo n.º 5
0
        public static Boolean IsExistedEmail(string email)
        {
            var db   = SqliteDB.connect();
            var data = db.Table <Professeur>();
            var d1   = data.Where(x => x.Email == email).FirstOrDefault();

            db.Close();
            if (d1 != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 6
0
        public static Boolean Login(string username, string password)
        {
            var db   = SqliteDB.connect();
            var data = db.Table <Professeur>();
            var d1   = data.Where(x => x.Username == username && x.Password == password).FirstOrDefault();

            db.Close();
            if (d1 != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public static List <Etudiant> GetAllFiliere()
        {
            var db = SqliteDB.connect();

            return(db.Query <Etudiant>("select Filiere from Etudiant").ToList());
        }