1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using LeaRun.Application.Entity.PublicInfoManage;
- using LeaRun.Application.IService.PublicInfoManage;
- using LeaRun.Data.Repository;
- using LeaRun.Util.WebControl;
- using System.Collections.Generic;
- using System.Linq;
- namespace LeaRun.Application.Service.PublicInfoManage
- {
- /// <summary>
- /// 版 本 6.1
- /// Copyright (c) 2013-2016 上海力软信息技术有限公司
- /// 创 建:佘赐雄
- /// 日 期:2016-04-25 10:45
- /// 描 述:日程管理
- /// </summary>
- public class ScheduleService : RepositoryFactory<ScheduleEntity>, IScheduleService
- {
- #region 获取数据
- /// <summary>
- /// 获取列表
- /// </summary>
- /// <param name="queryJson">查询参数</param>
- /// <returns>返回列表</returns>
- public IEnumerable<ScheduleEntity> GetList(string queryJson)
- {
- return this.BaseRepository().IQueryable().ToList();
- }
- /// <summary>
- /// 获取实体
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <returns></returns>
- public ScheduleEntity GetEntity(string keyValue)
- {
- return this.BaseRepository().FindEntity(keyValue);
- }
- #endregion
- #region 提交数据
- /// <summary>
- /// 删除数据
- /// </summary>
- /// <param name="keyValue">主键</param>
- public void RemoveForm(string keyValue)
- {
- this.BaseRepository().Delete(keyValue);
- }
- /// <summary>
- /// 保存表单(新增、修改)
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <param name="entity">实体对象</param>
- /// <returns></returns>
- public void SaveForm(string keyValue, ScheduleEntity entity)
- {
- if (!string.IsNullOrEmpty(keyValue))
- {
- entity.Modify(keyValue);
- this.BaseRepository().Update(entity);
- }
- else
- {
- entity.Create();
- this.BaseRepository().Insert(entity);
- }
- }
- #endregion
- }
- }
|