コード例 #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);