Loguin en c# con sqlserver manual completo y recursos 2019

LOGUIN EN C# CON SQLSERVER



CODIGO PARA EL PRIMER CAPITULO DEL VIDEO

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 System.Runtime.InteropServices;

namespace LOGIN01
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        [DllImport("user32.DLL", EntryPoint = "ReleaseCapture")]
        private extern static void ReleaseCapture();

        [DllImport("user32.DLL", EntryPoint = "SendMessage")]
        private extern static void SendMessage(System.IntPtr hWnd, int wMsg, int wParam, int lParam);


        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void Panel1_MouseMove(object sender, MouseEventArgs e)
        {
            ReleaseCapture();
            SendMessage(this.Handle, 0x112, 0xf012, 0);
        }

        private void PictureBox1_Click(object sender, EventArgs e)
        {
            Application.Exit();

        }
    }

}


AQUÍ LES DEJO LA IMAGEN UTILIZADA




COLORES UTILIZADOS PARA LA PRIMERA PARTE


COLOR ROZADO ::  >>>>>>>    185; 33; 96
COLOR DE LOS TEXTBOX:: >>>>>>>>      42; 55; 71

PARA LOS BORDES Y PROGRESS BAR CIRCULAR

utilizaremos la librería bunifu en un vídeo en el canal de SOLUCIONES TECNOLÓGICAS indico como implementar esta librería en nuestro visual estudio


LA SEGUNDA PARTE


REALIZAREMOS LA CONEXIÓN CON LA BASE DE DATOS

agregaremos una nueva clase en nuestro proyecto para la conexion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;


namespace LOGIN01
{
    class Conexion
    {
        public static SqlConnection Conectar()
        {
            SqlConnection cn = new SqlConnection("SERVER=GLOBALSACK;DATABASE=LOGIN01;integrated security=true;");

            cn.Open();
            return cn;

        }
    }
}



LISTO AHORA REALIZAREMOS LA VALIDACIÓN DEL USUARIO Y PASSWORDS 

el siguiente código ira en el boton INGRESAR

   private void Button1_Click(object sender, EventArgs e)
        {
            Conexion.Conectar();

            SqlDataAdapter da = new SqlDataAdapter("SELECT COUNT(*) FROM USUARIOS WHERE USERS='" + textBox1.Text + "' AND PASSWORDS ='" + textBox2.Text + "'", Conexion.Conectar());

            DataTable dt = new DataTable();
            da.Fill(dt);
            
            if(dt.Rows [0][0].ToString()=="1")
            {
                this.Hide();
                new Form2().Show();

            }
            else
            {
                MessageBox.Show("Acceso Denegado");
            }
        }


LISTO TODOS LOS VÍDEOS EN EL CANAL DE SOLUCIONES TECNOLÓGICAS





Share:

PLANTILLAS POWERPOINT 2019

PLANTILLAS POWERPOINT 2019


01 PRESENTACIÓN AVANZADA ESTILO SLIDERSHOP


DESCARGA DESDE ESTE LINK


PLANTILLA AVANZADA 101


Anillos diseño ULTIMATE



ANILLOS


En este Link les dejo el programa para obtener los iconos para nuestras presentaciones de acuerdo para su instalación los presionan en siguiente y siguiente luego finalizar




PROGRAMA ICONOS




Diseño diapositiva estilo bohordar







DASBOAR

Diapositiva estilo LIBRO BOOK




LIBRO EBBOK




Repositorios para la diapositiva de los OGANOS DEL CUERPO HUMANO
















Share:

Anuncio de Enlaces

Buscar este blog

  • ()
  • ()
Mostrar más
Todos los derechos reservados por AITRAQUER. Con la tecnología de Blogger.

Unordered List

  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  • Aliquam tincidunt mauris eu risus.
  • Vestibulum auctor dapibus neque.

Pages

Theme Support

Need our help to upload or customize this blogger template? Contact me with details about the theme customization you need.