/// <summary> /// 创建一个新实例 /// </summary> /// <param name="pEntity">实体实例</param> public void Create(T_UserGuideModulesEntity pEntity) { _currentDAO.Create(pEntity); }
/// <summary> /// 更新 /// </summary> /// <param name="pEntity">实体实例</param> /// <param name="pTran">事务实例,可为null,如果为null,则不使用事务来更新</param> public void Update(T_UserGuideModulesEntity pEntity, IDbTransaction pTran) { _currentDAO.Update(pEntity, pTran); }
/// <summary> /// 分页根据实体条件查询实体 /// </summary> /// <param name="pQueryEntity">以实体形式传入的参数</param> /// <param name="pOrderBys">排序组合</param> /// <returns>符合条件的实体集</returns> public PagedQueryResult <T_UserGuideModulesEntity> PagedQueryByEntity(T_UserGuideModulesEntity pQueryEntity, OrderBy[] pOrderBys, int pPageSize, int pCurrentPageIndex) { return(_currentDAO.PagedQueryByEntity(pQueryEntity, pOrderBys, pPageSize, pCurrentPageIndex)); }
/// <summary> /// 根据实体条件查询实体 /// </summary> /// <param name="pQueryEntity">以实体形式传入的参数</param> /// <param name="pOrderBys">排序组合</param> /// <returns>符合条件的实体集</returns> public T_UserGuideModulesEntity[] QueryByEntity(T_UserGuideModulesEntity pQueryEntity, OrderBy[] pOrderBys) { return(_currentDAO.QueryByEntity(pQueryEntity, pOrderBys)); }
/// <summary> /// 删除 /// </summary> /// <param name="pEntity"></param> public void Delete(T_UserGuideModulesEntity pEntity) { _currentDAO.Delete(pEntity); }
/// <summary> /// 更新 /// </summary> /// <param name="pEntity">实体实例</param> public void Update(T_UserGuideModulesEntity pEntity) { _currentDAO.Update(pEntity); }
protected override GetModuleNextStepRD ProcessRequest(DTO.Base.APIRequest <GetModuleNextStepRP> pRequest) { var rd = new GetModuleNextStepRD(); var preModule = new NextModule(); var nextModule = new NextModule(); var nowModule = new NextModule(); var para = pRequest.Parameters; var loggingSessionInfo = new SessionManager().CurrentUserLoginInfo; T_UserGuideModulesBLL bll = new T_UserGuideModulesBLL(loggingSessionInfo); T_UserGuideModulesEntity entity = new T_UserGuideModulesEntity(); ///上一步 entity = bll.QueryByEntity(new T_UserGuideModulesEntity() { ParentModule = new Guid(para.ParentModule), ModuleStep = para.Step - 1, IsDelete = 0 }, null).SingleOrDefault(); if (entity != null) { preModule.ModuleCode = entity.ModuleCode; preModule.ParentModule = entity.ParentModule.ToString(); preModule.Url = entity.Url; preModule.VideoUrl = entity.VideoUrl; preModule.ModuleStep = (int)entity.ModuleStep; //preModule.UserGuideModulesId = entity.UserGuideModulesId.ToString(); //preModule.ImageUrl1 = entity.ImageUrl1; //preModule.ImageUrl2 = entity.ImageUrl2; //preModule.ImageUrl3 = entity.ImageUrl3; } ///当前步 entity = bll.QueryByEntity(new T_UserGuideModulesEntity() { ParentModule = new Guid(para.ParentModule), ModuleStep = para.Step, IsDelete = 0 }, null).SingleOrDefault(); if (entity != null) { nowModule.ModuleCode = entity.ModuleCode; nowModule.ParentModule = entity.ParentModule.ToString(); nowModule.Url = entity.Url; nowModule.VideoUrl = entity.VideoUrl; nowModule.ModuleStep = (int)entity.ModuleStep; //nowModule.UserGuideModulesId = entity.UserGuideModulesId.ToString(); //nowModule.ImageUrl1 = entity.ImageUrl1; //nowModule.ImageUrl2 = entity.ImageUrl2; //nowModule.ImageUrl3 = entity.ImageUrl3; } ///下一步 entity = bll.QueryByEntity(new T_UserGuideModulesEntity() { ParentModule = new Guid(para.ParentModule), ModuleStep = para.Step + 1, IsDelete = 0 }, null).SingleOrDefault(); if (entity != null) { nextModule.ModuleCode = entity.ModuleCode; nextModule.ParentModule = entity.ParentModule.ToString(); nextModule.Url = entity.Url; nextModule.VideoUrl = entity.VideoUrl; nextModule.ModuleStep = (int)entity.ModuleStep; //nextModule.UserGuideModulesId = entity.UserGuideModulesId.ToString(); //nextModule.ImageUrl1 = entity.ImageUrl1; //nextModule.ImageUrl2 = entity.ImageUrl2; //nextModule.ImageUrl3 = entity.ImageUrl3; } rd.PreModule = preModule; rd.NextModule = nextModule; rd.NowModule = nowModule; return(rd); }