Exemplo n.º 1
0
 public void stdLecturesInsert(ders_al ders_Al)      // students ders_al insert öğrencinin id sine kayıt edilen ders
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         context.ders_al.Add(ders_Al);
         context.SaveChanges();
     }
 }
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 TSpointsAddStd(points points)   //Teachers ppoints tablosuna insert
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         context.points.Add(points);
         context.SaveChanges();
     }
 }
Exemplo n.º 4
0
        // period

        public void periodInsert(selected_period selected)
        {
            using (odev_sql_OKULContext context = new odev_sql_OKULContext())
            {
                context.selected_period.Add(selected);
                context.SaveChanges();
            }
        }
Exemplo n.º 5
0
 public void TSders_verAdd(ders_ver ders_Ver)    //teacher ders_ver kayıt
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         //DERS_VER kayıt
         context.ders_ver.Add(ders_Ver);
         context.SaveChanges();
     }
 }
Exemplo n.º 6
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.º 7
0
 public void Stdadd(student student) //students insert
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         //Öğrenci kayıt
         context.students.Add(student);
         context.SaveChanges();
     }
 }
Exemplo n.º 8
0
 public void Pointdel(points points) //Öğrencinin puan tablosunda kaydı var ise silinir
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         //Öğrenci silme
         var entity = context.Entry(points);
         entity.State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }
Exemplo n.º 9
0
 public void dadel(ders_al ders_Al) //Öğrenci bir derse kayıtlı ise bunlar silinir
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         //Öğrenci silme
         var entity = context.Entry(ders_Al);
         entity.State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }
Exemplo n.º 10
0
 // öğrenci silme *****************************************************************************************
 public void stddel(student student) //students delete
 {
     using (odev_sql_OKULContext context = new odev_sql_OKULContext())
     {
         //Öğrenci silme
         var entity = context.Entry(student);
         entity.State = System.Data.Entity.EntityState.Deleted;
         context.SaveChanges();
     }
 }
Exemplo n.º 11
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.º 12
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();
            }
        }
Exemplo n.º 13
0
        public void TSNewSecurityWord(int id, string newSecurityWord)
        {
            newSecurityWord = Encrypt(newSecurityWord, "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_sw in entity)
                {
                    new_sw.teacher_security_the_word = newSecurityWord;
                }
                context.SaveChanges();
            }
        }
Exemplo n.º 14
0
        public void NewSecurityWord(int id, string newSecurityWord)
        {
            newSecurityWord = Encrypt(newSecurityWord, "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_sw in entity)
                {
                    new_sw.std_security_the_word = newSecurityWord;
                }
                context.SaveChanges();
            }
        }
Exemplo n.º 15
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.º 16
0
        public void stdupdate(int id, string name, string surname, string tc_no)
        {
            using (odev_sql_OKULContext context = new odev_sql_OKULContext())
            {
                var entity = from std in context.students where std.std_id == id select std;

                foreach (student student in entity)
                {
                    student.std_name    = name;
                    student.std_surname = surname;
                    student.tc_no       = tc_no;
                }
                context.SaveChanges();
            }
        }
Exemplo n.º 17
0
        public void TSupdate(int id, string name, string surname, string tc_no)
        {
            using (odev_sql_OKULContext context = new odev_sql_OKULContext())
            {
                var entity = from ts in context.teachers where ts.teacher_id == id select ts;

                foreach (teacher teacher in entity)
                {
                    teacher.teacher_name    = name;
                    teacher.teacher_surname = surname;
                    teacher.tc_no           = tc_no;
                }
                context.SaveChanges();
            }
        }