Exemplo n.º 1
0
 public static List <teacher> GetAll()
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         return(context.teachers.ToList());   // teacher listview döndürme
     }
 }
Exemplo n.º 2
0
 public void TSadd(teacher teacher)      //teacher insert
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext()) {
         //öğretmen kayıt
         context.teachers.Add(teacher);
         context.SaveChanges();
     }
 }
Exemplo n.º 3
0
 public void dvDel(ders_ver ders_)
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())   //Öğretmen silmek için ilişkili olduğu için bu tablodaki veriler de
     {                                                                   //silinir.
         var entity = context.Entry(ders_);
         entity.State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }
Exemplo n.º 4
0
        // Öğretmen silme *************************************************************************************************************************
        public void TSdel(teacher teacher)  //teacher delete
        {
            using (odev_sql_OKULContext context = new odev_sql_OKULContext())
            {
                //öğretmen silme

                var entity = context.Entry(teacher);
                entity.State = System.Data.Entity.EntityState.Deleted;
                context.SaveChanges();
            }
        }
Exemplo n.º 5
0
        public void ResetSTDPsw(int id, string psw) //şifre yenile
        {
            psw = Encrypt(psw, "sblw-3hn8-sqoy19");
            using (odev_sql_OKULContext context = new odev_sql_OKULContext())
            {
                var entity = from s in context.students where s.std_id == id select s;

                foreach (student new_psw in entity)
                {
                    new_psw.std_parola = psw;
                }
                context.SaveChanges();
            }
        }
Exemplo n.º 6
0
        public void ResetTSPsw(int id, string psw)  //Teacher şifre yenile
        {
            psw = Encrypt(psw, "sblw-3hn8-sqoy19");
            using (odev_sql_OKULContext context = new odev_sql_OKULContext())
            {
                var entity = from t in context.teachers where t.teacher_id == id select t;

                foreach (teacher new_psw in entity)
                {
                    new_psw.teacher_password = psw;
                }
                context.SaveChanges();
            }
        }