Exemple #1
0
 public void updateCurrentLogin(table_User user)
 {
     System.DateTime curtime = new System.DateTime();
     curtime = System.DateTime.Now;
     try
     {
         user.user_current_login = curtime;
     }
     catch (Exception ex) { }
     _dbcontext.SaveChanges();
 }
Exemple #2
0
        public bool addAdmin(String name, String password, long cell, String email)
        {
            table_Admin admin = new table_Admin();

            admin.admin_email         = email;
            admin.admin_name          = name;
            admin.admin_password      = password;
            admin.admin_phone         = cell;
            admin.admin_current_login = DateTime.Now;
            _dbcontext.table_Admin.Add(admin);
            return(_dbcontext.SaveChanges() > 0);
        }
Exemple #3
0
 public bool addEvent(table_Event evet)
 {
     _dbContext.table_Event.Add(evet);
     return(_dbContext.SaveChanges() > 0);
 }