/// <summary> /// 返回EntityModel类 /// </summary> /// <returns></returns> public EntityDataSourceModel GetEModel() { EntityDataSourceModel eModel = new EntityDataSourceModel(); eModel.EntitySetName = "View_Role"; eModel.DefaultContainerName = "MWDatabaseEntities"; eModel.ConnectionString = "name=MWDatabaseEntities"; eModel.Where = " it.IsDeleted=false"; return(eModel); }
/// <summary> /// GridView绑定数据 /// </summary> public void GridViewData() { //实例化EntityDataSourceModel 属性类 EntityDataSourceModel eModel = new EntityDataSourceModel(); UserBLL UserBLLs = new UserBLL(); eModel = UserBLLs.GetEModel(); EntityDataSourceGridUser.EntitySetName = eModel.EntitySetName; if (!string.IsNullOrEmpty(eModel.Where)) { EntityDataSourceGridUser.Where = eModel.Where; } if (!string.IsNullOrEmpty(eModel.OrderBy)) { EntityDataSourceGridUser.OrderBy = eModel.OrderBy; } EntityDataSourceGridUser.DefaultContainerName = eModel.DefaultContainerName; EntityDataSourceGridUser.ConnectionString = eModel.ConnectionString; }
/// <summary> /// GridView绑定数据 /// </summary> public void GridViewData() { //实例化EntityDataSourceModel 属性类 EntityDataSourceModel eModel = new EntityDataSourceModel(); RoleBLL RoleBLLs = new RoleBLL(); eModel = RoleBLLs.GetEModel(); EntityDataSourceRole.EntitySetName = eModel.EntitySetName; if (!string.IsNullOrEmpty(eModel.Where)) { EntityDataSourceRole.Where = eModel.Where; } if (!string.IsNullOrEmpty(eModel.OrderBy)) { EntityDataSourceRole.OrderBy = eModel.OrderBy; } EntityDataSourceRole.DefaultContainerName = eModel.DefaultContainerName; EntityDataSourceRole.ConnectionString = eModel.ConnectionString; }
/// <summary> /// 返回EntityModel类 /// </summary> /// <returns></returns> public EntityDataSourceModel GetEModel() { EntityDataSourceModel eModel = new EntityDataSourceModel(); eModel.EntitySetName = "View_User"; eModel.DefaultContainerName = "MWDatabaseEntities"; eModel.ConnectionString = "name=MWDatabaseEntities"; eModel.Where = " it.IsDeleted=false"; return eModel; }