protected void btn_Aceptar_Click(object sender, EventArgs e)
        {
            if (txt_login.Text == "") {
                lbl_Mensaje.Text = "Ingrese el Login";
                return;
            }

            if (txt_pwd.Text == "")
            {
                lbl_Mensaje.Text = "Ingrese el password";
                return;
            }

            if (txt_pwd2.Text == "")
            {
                lbl_Mensaje.Text = "Ingrese el password 2";
                return;
            }

            if (txt_des.Text == "")
            {
                lbl_Mensaje.Text = "Ingrese la descripcion del usuario";
                return;
            }

            if (txt_pwd.Text.Trim() != txt_pwd2.Text.Trim())
            {

                lbl_Mensaje.Text = "Las contraseñas no son iguales";
                return;
            }

            Modelos.CO_USUARIO usu = new Modelos.CO_USUARIO
            {
                LOGIN = txt_login.Text.Trim(),
                PWD = txt_pwd.Text.Trim(),
                DESCRIPCION = txt_des.Text.Trim(),
                NOMBRES = txt_nombres.Text.Trim(),
                ESTADO = 1

            };

            Modelos.DBProyectoEntities db = new Modelos.DBProyectoEntities();
            //db.CO_USUARIO.AddObject(usu);
            db.AddToCO_USUARIO(usu);
            db.SaveChanges();

            Server.Transfer(@"..\Paginas\Lista_Usuario.aspx", true);
        }
        protected void btn_Aceptar_Click(object sender, EventArgs e)
        {
            if (txt_Login.Text.Trim().Length == 0) {
                lbl_mensaje.Text = "Ingrese el nombre de usuario";
                return;
            }

            if (txt_pwd.Text.Trim().Length == 0)
            {
                lbl_mensaje.Text = "Ingrese la contraseña";
                return;
            }

            Modelos.DBProyectoEntities context = new Modelos.DBProyectoEntities();

            var usuario = from usu in context.CO_USUARIO select usu;

            foreach (var u in usuario)
            {
                if ((u.LOGIN == txt_Login.Text.Trim()) && (u.PWD == txt_pwd.Text.Trim()))
                {
                    if (u.ESTADO == 0)
                    {
                        lbl_mensaje.Text = "La cuenta de usuario esta desactivada";
                        return ;
                    }
                    else {

                        Session["Login_Des"] = u.DESCRIPCION;
                        Session["Login_Nom"] = u.NOMBRES;
                        Server.Transfer(@"..\Default.aspx", true);
                        break;
                    }

                }

            }

            lbl_mensaje.Text = "Usuario y/o Contraseña Incorrecta";
        }