public static int Register(List <string> all_fields) { if (FieldsFilled(all_fields) && DataFunctions.IsUnique(all_fields[0], all_fields[4])) { Domain.User user = CreateUser(all_fields[0], all_fields[1], all_fields[2], all_fields[3], all_fields[4]); DataFunctions.AddUser(user); return(1); } else if (!FieldsFilled(all_fields)) { return(0); } else { return(-1); } }