コード例 #1
0
        protected void btnGuardar_Click(object sender, EventArgs e)
        {
            menu_C = new Menu_C();
            menu_M = new Menu_M();
            func   = new FuncionesVarias();
            dt     = new DataTable();
            string key = "b14ca5898a4e4133bbce2ea2315a1916";

            //            string encryp = func.EncryptString(key, txtContrasenia.Text); .Rows[0]["mensaje"].ToString()
            if (validarControles() == true)
            {
                menu_M.usuario     = txtUsuario.Text;
                menu_M.contrasenia = func.EncryptString(key, txtContrasenia.Text);
                menu_M.idEmpledo   = int.Parse(ddlEmpleados.SelectedValue);
                try
                {
                    dt = menu_C.ingresoUsuario(menu_M);
                    if (dt.Rows.Count > 0)
                    {
                        lblSuccess.Visible = true;
                        lblSuccess.Text    = "Ingreso Exitosamente" + dt.Rows[0]["mensaje"].ToString();
                        //limpiar();
                    }
                    else
                    {
                        lblError.Visible = true;
                        lblError.Text    = "Error al ingresar";
                    }
                }catch (Exception ex)
                {
                    lblError.Visible = true;
                    lblError.Text    = "Error.." + ex.ToString();
                }
            }
        }
コード例 #2
0
        public ListCacheEntidad(String nombre, CondicionBase condicion, List <T> lista)
        {
            this.TipoEntidad = typeof(T);

            if (!String.IsNullOrEmpty(nombre))
            {
                this.Nombre = nombre;
            }
            else
            {
                this.Nombre = this.TipoEntidad.Name;
            }

            if (lista == null)
            {
                this.TipoServicio = FuncionesVarias.ObtenerTipoServicio(this.TipoEntidad.Name + "Servicio");
            }

            this.Condicion = condicion;
            this.Lista     = lista;
        }