breack
breack
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
but idk what i did wrong
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
im little confuse idk if u can just send me that i need to remove
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
sure
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
and thats what im asking why when u put this user and this password says "null"
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
but when you try to put that it comes out null (so it doesn't recognize it) I guess there must be something wrong in the "Where" but I don't know what it is
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
because the idea is u can login with this user
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
the program doesnt recognize the data base i think
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
i did put the problem is
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
sure
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
this is the full code of that picture
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Negocio; using Entidad; namespace ProyectoBD { public partial class Login : Form { public Login() { InitializeComponent(); } private void btnCancelar_Click(object sender, EventArgs e) { this.Close(); } private void btnIngresar_Click(object sender, EventArgs e) { List<Usuario> PRUEBA = new N_Usuario().listar(); Usuario osuario = new N_Usuario().listar().Where(u => u.Documento == txtdocumento.Text && u.Clave == txtclave.Text).FirstOrDefault(); if(osuario != null ) { Inicio form = new Inicio(); form.Show(); this.Hide(); form.FormClosing += Frm_closing; }else { MessageBox.Show("No se encontre el usuario","Mensaje",MessageBoxButtons.OK,MessageBoxIcon.Exclamation); } } private void Frm_closing(object sender , FormClosingEventArgs e) { txtdocumento.Text = ""; txtclave.Text = ""; this.Show(); } } }
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
im gonna show u the conecction cape
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
i got 4 capes
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
The code is made in capes so it is a little difficult
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
the program is supposed to work with the sql database
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data; using System.Data.SqlClient; using Entidad; namespace Datos { public class D_Usuario { public List<Usuario> listar () { List<Usuario> lista = new List <Usuario>(); using (SqlConnection oconexion = new SqlConnection(Conexion.cadena)) { try { string query = "Select Id_usuario,Documento,Nombre_Completo,correo,Clave,Estado from usuario"; SqlCommand cmd = new SqlCommand(query, oconexion); cmd.CommandType = CommandType.Text; oconexion.Open(); using (SqlDataReader dr = cmd.ExecuteReader()) { while(dr.Read()) { lista.Add(new Usuario() { Id_usuario = Convert.ToInt32(dr["Id_usuario"]), Documento = dr["Documento"].ToString(), Nombre_Completo = dr["Nombre_Completo"].ToString(), correo = dr["correo"].ToString(), Clave =dr["clave"].ToString(), Estado = Convert.ToBoolean(dr["Estado"]) }); } } } catch (Exception ex) { lista = new List<Usuario>(); } } return lista; } } }
46 replies
CC#
Created by breack on 11/27/2023 in #help
i need help because i dont why this is null
1 second
46 replies