private void CrearUsuarioCommandExecute() { DataBase data = new DataBase(); if (data.CheckEmail(Email) == false) { List <CultureInfo> cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures).ToList(); var LCIDCountry = cultures.FindIndex(x => (new RegionInfo(x.LCID)).DisplayName == selectedcountry); RegionInfo region = new RegionInfo(cultures[LCIDCountry].LCID); User = GetResources.GetUser(); User.Name = Name; User.Email = Email; User.Country = region.ThreeLetterISORegionName; User.Industry = Industry; User.Password = Password1; int id = 0; data.InsertUser(User.Name, User.Password, User.Email, User.Industry, User.Country, out id); User.User_id = id; MainWindowExecute(); } else { MessageBox.Show("El correo ya se encuentra registrado."); } }
private void MainWindowLoad(object sender, RoutedEventArgs e) { var User = GetResources.GetUser(); DataBase data = new DataBase(); data.InsertOperation(User); }