using Yw.BLL;
namespace HStation.BLL
{
///
///
///
public partial class AssetsFlowmeterFactor
{
private readonly HStation.CAL.IAssetsFlowmeterFactor _cal = CALCreateHelper.CreateCAL();
#region Query
///
/// 获取所有
///
public virtual async Task> GetAll()
{
var dtoList = await _cal.GetAll();
return Dto2Vmos(dtoList);
}
///
/// 通过 ID 获取
///
public virtual async Task GetByID(long ID)
{
var dto = await _cal.GetByID(ID);
return Dto2Vmo(dto);
}
///
/// 通过 Ids 获取
///
public virtual async Task> GetByIds(List Ids)
{
var dtoList = await _cal.GetByIds(Ids);
return Dto2Vmos(dtoList);
}
#endregion
#region Insert
///
/// 插入一条
///
public virtual async Task Insert(AssetsFlowmeterFactorVmo vmo)
{
var dto = Vmo2AddDto(vmo);
var id = await _cal.Insert(dto);
return id;
}
///
/// 插入多条
///
public virtual async Task Inserts(List vmoList)
{
var dtoList = Vmo2AddDtos(vmoList);
var bol = await _cal.Inserts(dtoList);
return bol;
}
#endregion
#region Update
///
/// 更新
///
public virtual async Task Update(AssetsFlowmeterFactorVmo vmo)
{
var dto = Vmo2UpdateDto(vmo);
var bol = await _cal.Update(dto);
return bol;
}
///
/// 批量更新
///
public virtual async Task Updates(List vmoList)
{
var dtoList = Vmo2UpdateDtos(vmoList);
var bol = await _cal.Updates(dtoList);
return bol;
}
///
/// 更新排序码
///
public virtual async Task UpdateSortCode(long ID, int SortCode)
{
var bol = await _cal.UpdateSortCode(ID, SortCode);
return bol;
}
///
/// 批量更新排序码
///
public virtual async Task UpdateSorter(List Sorters)
{
var dtoList = Sorters.ToDtoList();
var bol = await _cal.UpdateSorter(dtoList);
return bol;
}
#endregion
#region Delete
///
/// 通过 ID 删除
///
public virtual async Task DeleteByID(long ID)
{
var bol = await _cal.DeleteByID(ID);
return bol;
}
#endregion
}
}