public AccIua(SexIua sexInput) { Names n = new Names(); Names.Info info = null; info = n.GetFirstLastNameInfo(sexInput); if (info != null) { firstName = info.FirstName; lastName = info.LastName; } login = Logins.GenerateLogin(firstName, lastName); //login = "******"; domen = MyData.Domen[1]; password = System.Web.Security.Membership.GeneratePassword(8, 0); Random r = new Random(DateTime.Now.Millisecond); password = Regex.Replace(password, @"[^a-zA-Z0-9]", m => r.Next(0, 9).ToString()); sex = sexInput; int year = r.Next(DateTime.Now.Year - 60, DateTime.Now.Year - 20); int month = r.Next(1, 12); int day = r.Next(1, 28); dateBirth = new DateTime(year, month, day); country = MyData.Countrys[1]; city = MyData.Citys[1]; secretQuestion = MyData.SecretQuestions[4]; answer = n.GetFirstLastNameInfo().LastName; }
public AccGoogle(Sex sexInput, string alternativeEmail) { Names n = new Names(); Names.Info info = null; info = n.GetFirstLastNameInfo(sexInput); if (info != null) { firstName = info.FirstName; lastName = info.LastName; } login = Logins.GenerateLogin(firstName, lastName); //login = "******"; domen = "google.com"; password = System.Web.Security.Membership.GeneratePassword(8, 0); Random r = new Random(DateTime.Now.Millisecond); password = Regex.Replace(password, @"[^a-zA-Z0-9]", m => r.Next(0, 9).ToString()); sexString = MyData.Sex[(int)sexInput]; int year = r.Next(DateTime.Now.Year - 60, DateTime.Now.Year - 20); int month = r.Next(1, 12); int day = r.Next(1, 28); dateBirth = new DateTime(year, month, day); this.alterEmail = alternativeEmail; //country = MyData.Countrys[1]; //city = MyData.Citys[1]; //secretQuestion = MyData.SecretQuestions[4]; //answer = n.GetFirstLastNameInfo().LastName; }