예제 #1
0
        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;
        }
예제 #2
0
        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);
        }
예제 #3
0
 partial void DeletePhoneUser(PhoneUser instance);
예제 #4
0
 partial void UpdatePhoneUser(PhoneUser instance);
예제 #5
0
 partial void InsertPhoneUser(PhoneUser instance);
예제 #6
0
 partial void DeletePhoneUser(PhoneUser instance);
예제 #7
0
 partial void UpdatePhoneUser(PhoneUser instance);
예제 #8
0
 partial void InsertPhoneUser(PhoneUser instance);