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(); } }
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(); } }
public void TSpointsAddStd(points points) //Teachers ppoints tablosuna insert { using (odev_sql_OKULContext context = new odev_sql_OKULContext()) { context.points.Add(points); context.SaveChanges(); } }
// period public void periodInsert(selected_period selected) { using (odev_sql_OKULContext context = new odev_sql_OKULContext()) { context.selected_period.Add(selected); context.SaveChanges(); } }
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(); } }
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(); } }
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(); } }
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(); } }
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(); } }
// öğ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(); } }
// Öğ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(); } }
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(); } }
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(); } }
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(); } }
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(); } }
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(); } }
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(); } }