using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EMIS.DataLogic.Repositories;
using EMIS.Entities;
using EMIS.ViewModel;
using EMIS.Utility;
namespace EMIS.CommonLogic.SystemServices
{
class BatchModifyServices : BaseServices, IBatchModifyServices
{
public BatchModifyRepository batchModifyRepository { get; set; }
public BatchModifyEventsRepository batchModifyEventsRepository { get; set; }
public BatchModifyExpandRepository batchModifyExpandRepository { get; set; }
///
/// 根据mnuID(页面ID)获取设置信息
///
/// 页面ID
///
public List GetBatchModifyList(string mnuID)
{
//查询条件
System.Linq.Expressions.Expression> expression = (x => true);
if (!string.IsNullOrEmpty(mnuID))
expression = (x => x.MNUID == mnuID);
return batchModifyRepository.GetList(expression).OrderBy(x => x.OrderNo).ToList();
}
///
/// 获取配置扩展表
///
///
///
public List GetBatchModifyExpandList(Guid? BatchModifyID)
{
//查询条件
System.Linq.Expressions.Expression> expression = (x => true);
expression = (x => x.BatchModifyID == BatchModifyID);
return batchModifyExpandRepository.GetList(expression).ToList();
}
///
/// 批量修改
///
/// 表名
/// 修改的列名
/// 修改的值
/// 要修改的数据ID
///
public bool BatchUpdate(string tableName, string columnName, object value, List list)
{
try
{
//UnitOfWork.PostUpdate += new Action