using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using HH.WMS.DAL;
|
using HH.WMS.Entitys;
|
using System.Data;
|
|
namespace HH.WMS.BLL
|
{
|
public class TestBLL : DapperBaseBLL
|
{
|
public OperateResult Test(TN_WM_INCREASE_INVENTORY_MSTEntity entity)
|
{
|
return UseTransaction(trans =>
|
{
|
//新增入库主表
|
CreateDAL<DapperDAL<TN_WM_INCREASE_INVENTORY_MSTEntity>>().Add(entity, trans);
|
//新增入库子表
|
CreateDAL<DapperDAL<TN_WM_INCREASE_INVENTORY_DTLEntity>>().AddRange(entity.DTLEntity, trans);
|
//修改CN_S_OP_NO="Test11" 入库主表(所有字段都会修改)
|
CreateDAL<DapperDAL<TN_WM_INCREASE_INVENTORY_MSTEntity>>().UpdateAll(entity
|
, new { CN_S_OP_NO = "Test11" }, trans);
|
|
CreateDAL<DapperDAL<TN_WM_INCREASE_INVENTORY_MSTEntity>>().Update(
|
new
|
{
|
|
},
|
new
|
{
|
|
}, trans);
|
});
|
}
|
|
/// <summary>
|
/// 多表查询动态列 List
|
/// </summary>
|
/// <param name="opNo"></param>
|
/// <returns></returns>
|
public List<dynamic> GetTestDynamicList(string opNo)
|
{
|
return CreateDAL<TestDAL>().GetTestDynamicList(opNo);
|
}
|
|
/// <summary>
|
/// 多表查询指定实体 List
|
/// </summary>
|
/// <param name="opNo"></param>
|
/// <returns></returns>
|
public List<TN_WM_INCREASE_INVENTORY_MSTEntity> GetTestList(string opNo)
|
{
|
return CreateDAL<TestDAL>().GetTestList(opNo);
|
}
|
|
|
/// <summary>
|
/// 多表查询 Datatable
|
/// </summary>
|
/// <param name="opNo"></param>
|
/// <returns></returns>
|
public DataTable GetTestDataTable(string opNo)
|
{
|
return CreateDAL<TestDAL>().GetTestDataTable(opNo);
|
}
|
|
}
|
}
|