Exemple #1
0
        public static MobileAccount Create(string first, string last, string email, string phone, string dob)
	    {
            var m = new MobileAccount
            {
                First = first,
                Last = last,
                Email = email.trim(),
                Phone = phone.GetDigits()
            };
            DateTime bd;
	        if (Util.DateValid(dob, out bd))
	            m.Birthdate = bd;
	        if (!Util.ValidEmail(m.Email))
	        {
	            m.Result = "email not valid";
	            return null;
	        }
            m.FindPersonSendAccountInfo();
            return m;
	    }
Exemple #2
0
        public static MobileAccount Create(string first, string last, string email, string phone, string dob)
        {
            var m = new MobileAccount
            {
                First = first,
                Last  = last,
                Email = email.trim(),
                Phone = phone.GetDigits()
            };
            DateTime bd;

            if (Util.DateValid(dob, out bd))
            {
                m.Birthdate = bd;
            }
            if (!Util.ValidEmail(m.Email))
            {
                m.Result = ResultCode.BadEmailAddress;
                return(m);
            }
            m.FindPersonSendAccountInfo();
            return(m);
        }