Esempio n. 1
0
        public static void Addition(List <Markdetail> markdetail)
        {
            Database DB = new Database();

            foreach (var n in markdetail)
            {
                Mark NewEntry = new Mark();
                NewEntry.SDID  = n.SDID;
                NewEntry.SUBID = n.Subid;
                NewEntry.Marks = n.Mark;
                DB.Marks.Add(NewEntry);
            }
            DB.SaveChanges();
        }
Esempio n. 2
0
        /* ____________________________________________________________________________________________________________________________________________________
         *   elhan*/
        public static int NotificationSend(int FromID, string Roles, string content)
        {
            Database     db  = new Database();
            Notification not = new Notification();
            Login        log = new Login();
            Role         rol = new Role();

            not.FromUserID = FromID;
            not.Roles      = Roles;
            not.Content    = content;
            not.Date       = DateTime.Now;
            db.Notifications.Add(not);
            db.SaveChanges();
            return(1);
        }