private void aceptar_Click(object sender, EventArgs e) { Proyecto.MenPas.WS_EstimacionF WS_EstimacionF = new Proyecto.MenPas.WS_EstimacionF(); try { if (WS_EstimacionF.EstaRegistrado(textBoxUsuario.Text, textBoxContraseña.Text) == true) { login = true; usuarioLogin = textBoxUsuario.Text; tipoUsuarioLogin = WS_EstimacionF.dame_perfil(usuarioLogin); MessageBox.Show(Cadenas.inicioOk); if (System.IO.File.Exists("pass.dll")) { System.IO.File.Delete("pass.dll"); } if (contraseñaCheckBox.Checked == true) { System.IO.StreamWriter sw = new System.IO.StreamWriter("pass.dll", true, System.Text.Encoding.Default); String s = textBoxUsuario.Text + " " + textBoxContraseña.Text; sw.WriteLine(s); sw.Close(); } else { System.IO.File.Create("pass.dll"); } } else { login = false; } } catch (Exception msg) { login = false; } }
private void PuntosMenpas_Load(object sender, EventArgs e) { Proyecto.MenPas.WS_EstimacionF WS_EstimacionF = new Proyecto.MenPas.WS_EstimacionF(); puntosGrid.DataSource = WS_EstimacionF.ObtenerPuntosDS().Tables[0]; }