public static string taskerLogon(string email, string password) { UserRecord ur = new UserRecord(); ur = (UserRecord)ur.selectOb("WHERE email='" + email + "' AND password = '******'"); if (ur == null) { return("Error: Name or Passwor is incorrect"); } return(ur.userID); }
public static string requesterLogon(string email, string password) { UserRecord ur = new UserRecord(); ur = (UserRecord)ur.selectOb("WHERE email='" + email + "' AND password = '******'"); if (ur == null) { return("Error: Name or Passwor is incorrect"); } if (ur.isRequester != "True") { return("Error: User not registered for this application."); } return(ur.userID); }
public static string requesterRegistration(string email, string password) { UserRecord ur = new UserRecord(); ur = (UserRecord)ur.selectOb("WHERE email='" + email + "'"); if (ur != null) { return("Error: Email already in use."); } ur = new UserRecord(); ur.email = email; ur.password = password; ur.isRequester = "True"; ur.userID = DateTime.Now.Ticks.ToString(); ur.insertOb(); return(ur.userID); }