public static string CreatePhoneUser(string phone, int pin) { //TODO -- Error Check! string errorMessage = ""; LData.DBDataContext db = new DBDataContext(Constants.AppConnectionString); //Verify phone number doesn't exist if (!DoesPhoneNumberExist(phone)) { LData.PhoneUser user = new PhoneUser(); user.ID = Guid.NewGuid(); user.PhoneNumber = phone; user.PIN = pin; user.DateCreated = DateTime.Now; user.DateLastAccessed = Constants.NullDate; user.DateActivated = DateTime.Now; db.PhoneUsers.InsertOnSubmit(user); db.SubmitChanges(); } else { errorMessage = "I'm sorry, you already have an account!"; } return errorMessage; }
public static string CreatePhoneUser(string phone, int pin) { //TODO -- Error Check! string errorMessage = ""; LData.DBDataContext db = new DBDataContext(Constants.AppConnectionString); //Verify phone number doesn't exist if (!DoesPhoneNumberExist(phone)) { LData.PhoneUser user = new PhoneUser(); user.ID = Guid.NewGuid(); user.PhoneNumber = phone; user.PIN = pin; user.DateCreated = DateTime.Now; user.DateLastAccessed = Constants.NullDate; user.DateActivated = DateTime.Now; db.PhoneUsers.InsertOnSubmit(user); db.SubmitChanges(); } else { errorMessage = "I'm sorry, you already have an account!"; } return(errorMessage); }
partial void DeletePhoneUser(PhoneUser instance);
partial void UpdatePhoneUser(PhoneUser instance);
partial void InsertPhoneUser(PhoneUser instance);