Exemple #1
0
 /// <summary>
 /// change the authinfo for this account
 /// </summary>
 /// <param name="authinfo">the new authinfo for this account</param>
 public void ChangeDriverAuthInfo(DriverAuthInfo authinfo)
 {
     if (authinfo != null)
     {
         this.DriverAuthInfo = authinfo;
     }
 }
Exemple #2
0
        /// <summary>
        /// Create a new Account
        /// </summary>
        /// <param name="mobile"></param>
        /// <param name="password"></param>
        /// <param name="usertype"></param>
        /// <returns></returns>
        public static Account CreateAccount(string mobile, string password, UserType usertype, DriverAuthInfo driverAuthInfo, GooderAuthInfo gooderAuthInfo, Location carLocation)
        {
            var account = new Account();

            account.GenerateNewIdentity();

            account.Mobile   = mobile;
            account.PassWord = password;

            account.UserType   = usertype;
            account.CreateTime = DateTime.Now;

            account.ChangeDriverAuthInfo(driverAuthInfo);
            account.ChangeGooderAuthInfo(gooderAuthInfo);
            account.ChangeCarLocation(carLocation);

            account.Enable();


            return(account);
        }