123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- using LeaRun.Application.Entity.CustomerManage;
- using LeaRun.Application.IService.CustomerManage;
- using LeaRun.Application.Service.CustomerManage;
- using LeaRun.Util.WebControl;
- using System.Collections.Generic;
- using System;
- namespace LeaRun.Application.Busines.CustomerManage
- {
- /// <summary>
- /// 版 本 6.1
- /// Copyright (c) 2013-2016 上海力软信息技术有限公司
- /// 创 建:佘赐雄
- /// 日 期:2016-03-14 09:47
- /// 描 述:客户信息
- /// </summary>
- public class CustomerBLL
- {
- private ICustomerService service = new CustomerService();
- #region 获取数据
- /// <summary>
- /// 获取列表
- /// </summary>
- /// <returns></returns>
- public IEnumerable<CustomerEntity> GetList()
- {
- return service.GetList();
- }
- /// <summary>
- /// 获取列表
- /// </summary>
- /// <param name="pagination">分页</param>
- /// <param name="queryJson">查询参数</param>
- /// <returns>返回分页列表</returns>
- public IEnumerable<CustomerEntity> GetPageList(Pagination pagination, string queryJson)
- {
- return service.GetPageList(pagination, queryJson);
- }
- /// <summary>
- /// 获取实体
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <returns></returns>
- public CustomerEntity GetEntity(string keyValue)
- {
- return service.GetEntity(keyValue);
- }
- #endregion
- #region 验证数据
- /// <summary>
- /// 客户名称不能重复
- /// </summary>
- /// <param name="fullName">名称</param>
- /// <param name="keyValue">主键</param>
- /// <returns></returns>
- public bool ExistFullName(string fullName, string keyValue)
- {
- return service.ExistFullName(fullName, keyValue);
- }
- #endregion
- #region 提交数据
- /// <summary>
- /// 删除数据
- /// </summary>
- /// <param name="keyValue">主键</param>
- public void RemoveForm(string keyValue)
- {
- try
- {
- service.RemoveForm(keyValue);
- }
- catch (Exception)
- {
- throw;
- }
- }
- /// <summary>
- /// 保存表单(新增、修改)
- /// </summary>
- /// <param name="keyValue">主键值</param>
- /// <param name="entity">实体对象</param>
- /// <returns></returns>
- public void SaveForm(string keyValue, CustomerEntity entity)
- {
- try
- {
- service.SaveForm(keyValue, entity);
- }
- catch (Exception)
- {
- throw;
- }
- }
- /// <summary>
- /// 保存表单
- /// </summary>
- /// <param name="keyValue"></param>
- /// <param name="entity">实体</param>
- /// <param name="moduleId">模块</param>
- public void SaveForm(string keyValue, CustomerEntity entity, string moduleId)
- {
- try
- {
- service.SaveForm(keyValue, entity, moduleId);
- }
- catch (Exception)
- {
- throw;
- }
- }
- #endregion
- }
- }
|