コード例 #1
0
 public bool AdminAddUser(string name, string email, string password, DateTime birthday, bool isadmin)
 {
     try
     {
         // `id` doesn't matter in the DBF function AddUser because database gives id automatically.
         User u = new User(1, name, email, password, birthday, 0, isadmin);
         return(DBF.AddUser(u));
     }
     catch (Exception e) { throw e; }
 }
コード例 #2
0
 public bool Signup(string name, string email, string password, DateTime birthday)
 {
     try
     {
         // `id` doesn't matter in the DBF function AddUser because database gives id automatically.
         User u      = new User(1, name, email, password, birthday);
         bool dpfRes = DBF.AddUser(u);
     }
     catch
     {
         return(false);
     }
     return(true);
 }