Beispiel #1
0
        //===========================Notifications==================================
        public void TeacherNotification(int teacherId, int otherId, string ortherType, int process)
        {
            var Noti = new TeacherNotification();

            Noti.TeacherId = teacherId;
            Noti.OtherId   = otherId;
            Noti.OtherType = ortherType;
            Noti.Viwed     = false;
            Noti.NotiDate  = DateTime.Now.ToString();
            if (process == 0)   //add course
            {
                Noti.NotiMessage = "Student of Id= " + otherId + " has been added to your class ";
            }
            //delete course
            else
            {
                Noti.NotiMessage = "Student of Id= " + otherId + " has been removed from your class ";
            }
            IStudent.AdderAsync(Noti);
            IStudent.Saver();
        }
Beispiel #2
0
 public int AdderAsync(TeacherNotification ob)
 {
     db.AddAsync(ob); return(1);
 }