Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理2
首先我们来写个类进行获取当前线程内唯一的DbContext
- using System;
- using System.Collections.Generic;
- using System.Data.Entity;
- using System.Linq;
- using System.Runtime.Remoting.Messaging;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- /// <summary>
- /// 当前线程内的数据上下文
- /// </summary>
- public class DbContextFactory {
- /// <summary>
- /// 获取当前线程内的数据上下文,如果当前线程内没有上下文,那么创建一个上下文,
- /// </summary>
- /// <returns>当前线程内的数据上下文</returns>
- public static DbContext GetCurrentDbContext() {
- DbContext currentContext = CallContext.GetData("CurrentDbContext") as DbContext;
- if (currentContext == null) {
- currentContext = new AuthorDesignContext();
- CallContext.SetData("CurrentDbContext", currentContext);
- }
- return currentContext;
- }
- }
- }
CallContext 这个类是用来获取当前线程内唯一的数据,可以避免一次性创建出多个数据库上下文。
接下来是对基础的仓储进行编写(DAL):BaseRepository类
对数据的增删改查操作
- using System;
- using System.Collections.Generic;
- using System.Data.Entity;
- using System.Data.Entity.Infrastructure;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class BaseRepository<T> where T : class,new() {
- public DbContext db = DbContextFactory.GetCurrentDbContext();
- /// <summary>
- /// 添加一条记录
- /// </summary>
- /// <param name="entity"></param>
- /// <returns></returns>
- public T AddEntity(T entity) {
- db.Entry<T>(entity).State = EntityState.Added;
- db.SaveChanges();
- return entity;
- }
- /// <summary>
- /// 修改一条记录
- /// </summary>
- /// <param name="entity"></param>
- /// <param name="property">需要修改的字段名称</param>
- /// <returns></returns>
- public bool EditEntity(T entity, string[] property) {
- DbEntityEntry<T> entry = db.Entry<T>(entity);
- entry.State = EntityState.Unchanged;
- foreach (var item in property) {
- entry.Property(item).IsModified = true;
- }
- return db.SaveChanges() > ;
- //return true;
- }
- /// <summary>
- /// 删除一条记录
- /// </summary>
- /// <param name="entity"></param>
- /// <returns></returns>
- public bool DeleteEntity(T entity) {
- DbEntityEntry<T> entry = db.Entry<T>(entity);
- entry.State = EntityState.Deleted;
- return db.SaveChanges() > ;
- // return true;
- }
- /// <summary>
- /// 查询列表
- /// </summary>
- /// <returns></returns>
- public IQueryable<T> LoadEntities() {
- return db.Set<T>();
- }
- /// <summary>
- /// 查询
- /// </summary>
- /// <param name="whereLamda">查询条件</param>
- /// <returns></returns>
- public IQueryable<T> LoadEntities(Expression<Func<T, bool>> whereLamda) {
- return db.Set<T>().Where<T>(whereLamda);
- }
- /// <summary>
- /// 对查询结果进行升序排序
- /// </summary>
- /// <typeparam name="S">排序字段类型</typeparam>
- /// <param name="queryable">查询结果</param>
- /// <param name="orderLamda">排序表达式</param>
- /// <returns>根据排序条件排序好之后的排序结果</returns>
- public IOrderedQueryable<T> Order<S>(IQueryable<T> queryable, Expression<Func<T, S>> orderLamda) {
- return queryable.OrderBy(orderLamda);
- }
- /// <summary>
- /// 对排序结果再次进行升序排序
- /// </summary>
- /// <typeparam name="S">排序字段类型</typeparam>
- /// <param name="queryable">根据排序条件排序好之后的排序结果</param>
- /// <param name="orderLamda">排序表达式</param>
- /// <returns>根据排序条件排序好之后的排序结果</returns>
- public IOrderedQueryable<T> ThenOrder<S>(IOrderedQueryable<T> queryable, Expression<Func<T, S>> orderLamda) {
- return queryable.ThenBy(orderLamda);
- }
- /// <summary>
- /// 对查询结果进行降序排序
- /// </summary>
- /// <typeparam name="S">排序字段类型</typeparam>
- /// <param name="queryable">查询结果</param>
- /// <param name="orderLamda">排序表达式</param>
- /// <returns>根据排序条件排序好之后的排序结果</returns>
- public IOrderedQueryable<T> OrderDesc<S>(IQueryable<T> queryable, Expression<Func<T, S>> orderLamda) {
- return queryable.OrderByDescending(orderLamda);
- }
- /// <summary>
- /// 对排序结果再次进行降序排序
- /// </summary>
- /// <typeparam name="S">排序字段类型</typeparam>
- /// <param name="queryable">根据排序条件排序好之后的排序结果</param>
- /// <param name="orderLamda">排序表达式</param>
- /// <returns>根据排序条件排序好之后的排序结果</returns>
- public IOrderedQueryable<T> ThenOrderDesc<S>(IOrderedQueryable<T> queryable, Expression<Func<T, S>> orderLamda) {
- return queryable.ThenByDescending(orderLamda);
- }
- /// <summary>
- /// 对排序结果进行分页操作
- /// </summary>
- /// <param name="queryable">根据排序条件排序好之后的排序结果</param>
- /// <param name="nowNum">跳过序列中指定数量的元素</param>
- /// <param name="pageSize">从序列的开头返回指定数量的连续元素</param>
- /// <returns>指定长度的列表</returns>
- public IQueryable<T> LoadPageEnties(IOrderedQueryable<T> queryable, int nowNum, int pageSize) {
- return queryable.Skip<T>(nowNum + ).Take<T>(pageSize);
- }
- /// <summary>
- /// 分页查询
- /// </summary>
- /// <typeparam name="S">排序类型</typeparam>
- /// <param name="whereLamda">查询条件</param>
- /// <param name="orderLamda">排序条件</param>
- /// <param name="isDesc">是否倒序</param>
- /// <param name="pageIndex">第几页</param>
- /// <param name="pageSize">页长</param>
- /// <param name="rowCount"></param>
- /// <returns></returns>
- public IQueryable<T> LoadEntities<S>(Expression<Func<T, bool>> whereLamda, Expression<Func<T, S>> orderLamda, bool isDesc, int pageIndex, int pageSize, out int rowCount) {
- var temp = db.Set<T>().Where<T>(whereLamda);
- rowCount = temp.Count();
- if (isDesc)
- temp = temp.OrderByDescending<T, S>(orderLamda).Skip<T>(pageSize * (pageIndex - ) + ).Take<T>(pageSize);
- else
- temp = temp.OrderBy<T, S>(orderLamda).Skip<T>(pageSize * (pageIndex - ) + ).Take<T>(pageSize);
- return temp;
- }
- }
- }
然后管理员类AdminRepository的DAL编写,继承BaseRepository类
- using AuthorDesign.IDAL;
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class AdminRepository : BaseRepository<Admin>{
- }
- }
我要做的是面向接口的(虽然没有BLL这层)那么接下来就对IDAL着层来进行编写,
首先也是IBaseRepository接口
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- public interface IBaseRepository<T> where T : class,new() {
- /// <summary>
- /// 添加一条记录
- /// </summary>
- /// <param name="entity"></param>
- /// <returns></returns>
- T AddEntity(T entity);
- /// <summary>
- /// 修改一条记录
- /// </summary>
- /// <param name="entity"></param>
- /// <param name="property">需要修改的字段名称</param>
- /// <returns></returns>
- bool EditEntity(T entity, string[] property);
- /// <summary>
- /// 删除一条记录
- /// </summary>
- /// <param name="entity"></param>
- /// <returns></returns>
- bool DeleteEntity(T entity);
- /// <summary>
- /// 查询
- /// </summary>
- IQueryable<T> LoadEntities();
- /// <summary>
- /// 查询
- /// </summary>
- /// <param name="whereLamda">查询条件</param>
- /// <returns></returns>
- IQueryable<T> LoadEntities(Expression<Func<T, bool>> whereLamda);
- /// <summary>
- /// 对查询结果进行升序排序
- /// </summary>
- /// <typeparam name="S">排序字段类型</typeparam>
- /// <param name="queryable">查询结果</param>
- /// <param name="orderLamda">排序表达式</param>
- /// <returns>根据排序条件排序好之后的排序结果</returns>
- IOrderedQueryable<T> Order<S>(IQueryable<T> queryable, Expression<Func<T, S>> orderLamda);
- /// <summary>
- /// 对排序结果再次进行升序排序
- /// </summary>
- /// <typeparam name="S">排序字段类型</typeparam>
- /// <param name="queryable">根据排序条件排序好之后的排序结果</param>
- /// <param name="orderLamda">排序表达式</param>
- /// <returns>根据排序条件排序好之后的排序结果</returns>
- IOrderedQueryable<T> ThenOrder<S>(IOrderedQueryable<T> queryable, Expression<Func<T, S>> orderLamda);
- /// <summary>
- /// 对查询结果进行降序排序
- /// </summary>
- /// <typeparam name="S">排序字段类型</typeparam>
- /// <param name="queryable">查询结果</param>
- /// <param name="orderLamda">排序表达式</param>
- /// <returns>根据排序条件排序好之后的排序结果</returns>
- IOrderedQueryable<T> OrderDesc<S>(IQueryable<T> queryable, Expression<Func<T, S>> orderLamda);
- /// <summary>
- /// 对排序结果再次进行降序排序
- /// </summary>
- /// <typeparam name="S">排序字段类型</typeparam>
- /// <param name="queryable">根据排序条件排序好之后的排序结果</param>
- /// <param name="orderLamda">排序表达式</param>
- /// <returns>根据排序条件排序好之后的排序结果</returns>
- IOrderedQueryable<T> ThenOrderDesc<S>(IOrderedQueryable<T> queryable, Expression<Func<T, S>> orderLamda);
- /// <summary>
- /// 对排序结果进行分页操作
- /// </summary>
- /// <param name="queryable">根据排序条件排序好之后的排序结果</param>
- /// <param name="nowNum">跳过序列中指定数量的元素</param>
- /// <param name="pageSize">从序列的开头返回指定数量的连续元素</param>
- /// <returns>指定长度的列表</returns>
- IQueryable<T> LoadPageEnties(IOrderedQueryable<T> queryable, int nowNum, int pageSize);
- /// <summary>
- /// 分页查询
- /// </summary>
- /// <typeparam name="S">排序类型</typeparam>
- /// <param name="whereLamda">查询条件</param>
- /// <param name="orderLamda">排序条件</param>
- /// <param name="isDesc">是否倒序</param>
- /// <param name="pageIndex">第几页</param>
- /// <param name="pageSize">页长</param>
- /// <param name="rowCount"></param>
- /// <returns></returns>
- IQueryable<T> LoadEntities<S>(Expression<Func<T, bool>> whereLamda, Expression<Func<T, S>> orderLamda, bool isDesc, int pageIndex, int pageSize, out int rowCount);
- }
- }
然后管理员接口IAdminRepository 继承IBaseRepository
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- public interface IAdminRepository:IBaseRepository<Admin> {
- }
- }
接下来我们更改下原来的 管理员类AdminRepository的DAL编写,引用了IAdminRepository 的接口
- using AuthorDesign.IDAL;
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class AdminRepository : BaseRepository<Admin>, IAdminRepository {
- }
- }
然后对其他Model也进行相同的编写。下面附上代码:
首先是IDAL,接口这里。
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- public interface IActionToPageRepository : IBaseRepository<ActionToPage> {
- }
- }
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- public interface IAdminLoginLogRepository : IBaseRepository<AdminLoginLog> {
- }
- }
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- public interface IAdminOperationRepository : IBaseRepository<AdminOperation> {
- }
- }
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- public interface IAdminToPageRepository : IBaseRepository<AdminToPage> {
- }
- }
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- public interface IAuthoryRepository : IBaseRepository<Authory> {
- }
- }
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- public interface IAuthoryToPageRepository : IBaseRepository<AuthoryToPage> {
- }
- }
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- public interface IPageActionRepository : IBaseRepository<PageAction> {
- }
- }
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- public interface IPageMenuRepository : IBaseRepository<PageMenu> {
- }
- }
其次是DAL。
- using AuthorDesign.IDAL;
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class ActionToPageRepository : BaseRepository<ActionToPage> ,IActionToPageRepository{
- }
- }
- using AuthorDesign.IDAL;
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class AdminLoginLogRepository : BaseRepository<AdminLoginLog>, IAdminLoginLogRepository {
- }
- }
- using AuthorDesign.IDAL;
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class AdminOperationRepository : BaseRepository<AdminOperation>, IAdminOperationRepository {
- }
- }
- using AuthorDesign.IDAL;
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class AdminToPageRepository : BaseRepository<AdminToPage>, IAdminToPageRepository {
- }
- }
- using AuthorDesign.IDAL;
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class AuthoryRepository : BaseRepository<Authory>, IAuthoryRepository {
- }
- }
- using AuthorDesign.IDAL;
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class AuthoryToPageRepository : BaseRepository<AuthoryToPage>, IAuthoryToPageRepository {
- }
- }
- using AuthorDesign.IDAL;
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class PageActionRepository : BaseRepository<PageAction>, IPageActionRepository {
- }
- }
- using AuthorDesign.IDAL;
- using AuthorDesign.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- public class PageMenuRepository : BaseRepository<PageMenu>,IPageMenuRepository{
- }
- }
然后就是写个专门用来对接WEB层与 DAL与IDAL的类。
RepositoryEnter 仓储入口,与web层的交互都交由这个类,附上代码
- using AuthorDesign.IDAL;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.DAL {
- /// <summary>
- /// 仓储入口
- /// </summary>
- public class RepositoryEnter:IRepositoryEnter {
- /// <summary>
- /// 统一SaveChange方法
- /// </summary>
- /// <returns></returns>
- public int SaveChange() {
- return DbContextFactory.GetCurrentDbContext().SaveChanges();
- }
- /// <summary>
- /// 获取页面与页面动作联系仓储
- /// </summary>
- public IDAL.IActionToPageRepository GetActionToPageRepository { get { return new ActionToPageRepository(); } }
- /// <summary>
- /// 获取管理员登录日志仓储
- /// </summary>
- public IDAL.IAdminLoginLogRepository GetAdminLoginLogRepository { get { return new AdminLoginLogRepository(); } }
- /// <summary>
- /// 获取管理员操作仓储
- /// </summary>
- public IDAL.IAdminOperationRepository GetAdminOperationRepository { get { return new AdminOperationRepository(); } }
- /// <summary>
- /// 获取管理员仓储
- /// </summary>
- public IDAL.IAdminRepository GetAdminRepository { get { return new AdminRepository(); } }
- /// <summary>
- /// 获取管理员与页面仓储
- /// </summary>
- public IDAL.IAdminToPageRepository GetAdminToPageRepository { get { return new AdminToPageRepository(); } }
- /// <summary>
- /// 获取角色仓储
- /// </summary>
- public IDAL.IAuthoryRepository GetAuthoryRepository { get { return new AuthoryRepository(); } }
- /// <summary>
- /// 获取角色与页面仓储
- /// </summary>
- public IDAL.IAuthoryToPageRepository GetAuthoryToPageRepository { get { return new AuthoryToPageRepository(); } }
- /// <summary>
- /// 获取页面动作仓储
- /// </summary>
- public IDAL.IPageActionRepository GetPageActionRepository { get { return new PageActionRepository(); } }
- /// <summary>
- /// 获取页面仓储
- /// </summary>
- public IDAL.IPageMenuRepository GetPageMenuRepository { get { return new PageMenuRepository(); } }
- }
- }
IRepositoryEnter接口
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AuthorDesign.IDAL {
- /// <summary>
- /// 仓储入口
- /// </summary>
- public interface IRepositoryEnter {
- /// <summary>
- /// 统一SaveChange方法
- /// </summary>
- /// <returns></returns>
- int SaveChange();
- /// <summary>
- /// 获取页面与页面动作联系仓储
- /// </summary>
- IDAL.IActionToPageRepository GetActionToPageRepository { get; }
- /// <summary>
- /// 获取管理员登录日志仓储
- /// </summary>
- IDAL.IAdminLoginLogRepository GetAdminLoginLogRepository { get; }
- /// <summary>
- /// 获取管理员操作仓储
- /// </summary>
- IDAL.IAdminOperationRepository GetAdminOperationRepository { get; }
- /// <summary>
- /// 获取管理员仓储
- /// </summary>
- IDAL.IAdminRepository GetAdminRepository { get; }
- /// <summary>
- /// 获取管理员与页面仓储
- /// </summary>
- IDAL.IAdminToPageRepository GetAdminToPageRepository { get; }
- /// <summary>
- /// 获取角色仓储
- /// </summary>
- IDAL.IAuthoryRepository GetAuthoryRepository { get; }
- /// <summary>
- /// 获取角色与页面仓储
- /// </summary>
- IDAL.IAuthoryToPageRepository GetAuthoryToPageRepository { get; }
- /// <summary>
- /// 获取页面动作仓储
- /// </summary>
- IDAL.IPageActionRepository GetPageActionRepository { get; }
- /// <summary>
- /// 获取页面仓储
- /// </summary>
- IDAL.IPageMenuRepository GetPageMenuRepository { get; }
- }
- }
对DAL于IDAL的一些编写就到这里,我感觉自己讲的很乱,好像没有什么主次之分。如果各位又不懂的或者感觉那里错了的,还请告诉我。
Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理2的更多相关文章
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理
这是本人第一次写,写的不好的地方还忘包含.写这个的主要原因是想通过这个来学习下EF的CodeFirst模式,本来也想用AngularJs来玩玩的,但是自己只会普通的绑定,对指令这些不是很熟悉,所以就基 ...
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理10
今天把用户的菜单显示和页面的按钮显示都做好了,下面先来个效果图 接下来说下我实现的方法: 首先我在每个方法前面都加了这个属性, /// <summary> /// 表示当前Action请求 ...
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理4
首先先加个区域,名为Admin using System.Web.Mvc; namespace AuthorDesign.Web.Areas.Admin { public class AdminAre ...
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理9
前两天因有事就没来得及写.今天刚刚好空了.这次写的是对角色和管理员对页面按钮之间的控制.先看页面效果 说明:先根据角色设置好角色的权限,然后管理员在对应的角色下的权限去设置其权限. 在设置角色权限的时 ...
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理6
接下来先做角色这一板块的(增删改查),首先要新建一个Role控制器,在添加一个RoleList的视图.表格打算采用的是bootstrap的表格. using System; using System. ...
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理5
我们先直接拷贝下blank.html这个页面的代码,顺带先建立一个Home控制器,并添加Index视图.将代码拷贝进去. <!DOCTYPE html> <html lang=&qu ...
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理7
做完角色之后接下来做先做页面按钮的增加.删除.修改.这里用到的功能和角色那边是一样的.就不多说了.直接上代码. 后台控制器代码 using AuthorDesign.Web.App_Start.Com ...
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理8
接下来做的是对页面的增删改查与页面与页面按钮之间的联系.先上代码和页面效果 using AuthorDesign.Web.App_Start.Common; using System; using S ...
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理1
首先给上项目的整体框架图:,这里我没有使用BLL,因为感觉太烦了就没有去使用. 那么接下来我们首先先去Model层中添加Model. 管理员类: using System; using System. ...
- Asp.Net MVC+BootStrap+EF6.0实现简单的用户角色权限管理3
首先在webconfig中加入下面这句代码,这个主要是用来生成数据库的连接字符串 <connectionStrings> <add name="AuthorDesignCo ...
随机推荐
- SQL Server里的闩锁耦合(Latch Coupling)
几年前,我写了篇关于闩锁和为什么SQL Server需要它们的文章.在今天的文章里,我想进一步谈下非缓存区闩锁(Non-Buffer Latches),还有在索引查找操作期间,SQL Server如何 ...
- Oracle索引梳理系列(四)- Oracle索引种类之位图索引
版权声明:本文发布于http://www.cnblogs.com/yumiko/,版权由Yumiko_sunny所有,欢迎转载.转载时,请在文章明显位置注明原文链接.若在未经作者同意的情况下,将本文内 ...
- 图片全部加载完成之后再显示页面ui,公司项目里用上,自己写的几行代码
说明: -----onload事件 这里我并没有考虑ie的兼容性 因为项目是移动端的: -----求大神指正~ -----自己测试正常 页面没加载完之前会有一个提示 /************** ...
- Visual Studio 2013 Update 3 RTM 正式发布
VS2013.3 RTM已发布! 完整安装包:http://download.microsoft.com/download/6/F/0/6F0777D3-3541-465F-8639-A8F9D36B ...
- HTML5填充颜色的fillStyle测试
效果:http://hovertree.com/texiao/html5/canvas/1/ 代码: <html> <head> <meta http-equiv=&qu ...
- PHP四个阶段目标以及第一阶段学习内容
PHP课程体系主要分为四个阶段,第一阶段讲的是网页HTML和数据库MySQL,第一阶段要学会网页制作的基础知识,熟用各种基本标签,对数据库进行操作,各项考核都能够达标,拿出出众的项目展示. 在第二个阶 ...
- MyBatis的resultMap
1.大家学习MyBatis时,可能会碰到实体类属性跟数据库字段不同的情况 如:数据库 ------ 实体类 stuname ----> name 即: 数据库中的stuname字段对 ...
- 使用HBaseShellPro操作Hadoop 2系列发行版CDH4.4
前言 对于hadoop,hbase由于项目紧张原因好几个月没有时间认真的来总结下了,最近有一些空,就来继续的把项目中用到的一些技术实际的写出来,动动手,好久没有写东西了,都生疏了,说起hadoop,公 ...
- css之颜色值、单位
颜色值 英文命令颜色:p{color:red;} RGB颜色:p{color:rgb(133,45,200);}每一项的值可以是 0~255 之间的整数,也可以是 0%~100% 的百分数.如:p{c ...
- Html + Css思维导图
最近整理的一份Html和Css的思维导图,共享给初学者使用. 各个知识点的详细案例介绍,后期会分阶段依次发布,希望对大家学习html和css有帮助. 如果对文中的知识点有异议,欢迎随时拍砖! 后期也回 ...