private void CambiaPass() { Inicio_Ctl objInicio = new Inicio_Ctl(); if (objInicio.CambiaPass(idUsu, Sistema_Cls.Encripta(txtContraseña.Text)) == true) { this.DialogResult = DialogResult.OK; this.Close(); } else { txtContraseña.Text = ""; txtRepetir.Text = ""; } }
private Boolean IngresaLicencia(string Llave) { Empresa_Ctl objEmpresa = new Empresa_Ctl(); dbEmpresa.DataSource = objEmpresa.Empresa(Llave); if (dbEmpresa.Count > 0) { if (objEmpresa.IngresaLicencia(Llave) == 1) { string Encriptado = string.Empty; string FechaEncriptada = string.Empty; Encriptado = Sistema_Cls.Encripta(Llave); FechaEncriptada = Sistema_Cls.Encripta(Fecha); RegistryKey equipoLocal = Registry.CurrentUser; equipoLocal = equipoLocal.OpenSubKey(@"Software\\VeoSystem", true); equipoLocal = Registry.CurrentUser; equipoLocal = equipoLocal.OpenSubKey(@"Software", true); RegistryKey VeoSystem = equipoLocal.CreateSubKey("VeoSystem"); VeoSystem.SetValue("Licencia", Encriptado, RegistryValueKind.String); VeoSystem.SetValue("FechaInst", FechaEncriptada, RegistryValueKind.String); return(true); } else { return(false); } } else { return(false); } }