You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
3.4 KiB
128 lines
3.4 KiB
/***************************************************************************
|
|
*
|
|
* 功能: 持久层基类
|
|
* 作者: Siasun
|
|
* 日期: 2013/4/11
|
|
*
|
|
* 修改日期:
|
|
* 修改人:
|
|
* 修改内容:
|
|
*
|
|
* *************************************************************************/
|
|
namespace SiaSun.LMS.Persistence
|
|
{
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using IBatisNet.Common;
|
|
using IBatisNet.DataMapper;
|
|
using IBatisNet.Common.Exceptions;
|
|
using SiaSun.LMS.Model;
|
|
|
|
/// <summary>
|
|
/// STORAGE_MAIN
|
|
/// </summary>
|
|
public class P_STORAGE_MAIN : P_Base_House
|
|
{
|
|
public P_STORAGE_MAIN ()
|
|
{
|
|
//
|
|
// TODO: 此处添加STORAGE_MAIN的构造函数
|
|
//
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到列表
|
|
/// </summary>
|
|
public IList<STORAGE_MAIN> GetList()
|
|
{
|
|
return ExecuteQueryForList<STORAGE_MAIN>("STORAGE_MAIN_SELECT",null);
|
|
}
|
|
|
|
public IList<STORAGE_MAIN> GetListStockBarcode(string STOCK_BARCODE)
|
|
{
|
|
return this.ExecuteQueryForList<STORAGE_MAIN>("STORAGE_MAIN_SELECT_BY_STOCK_BARCODE", STOCK_BARCODE);
|
|
}
|
|
|
|
public IList<STORAGE_MAIN> GetListCellID(int CELL_ID)
|
|
{
|
|
return this.ExecuteQueryForList<STORAGE_MAIN>("STORAGE_MAIN_SELECT_BY_CELL_ID", CELL_ID);
|
|
}
|
|
|
|
public IList<STORAGE_MAIN> GetListTemplateID(int TEMPLATE_ID)
|
|
{
|
|
return this.ExecuteQueryForList<STORAGE_MAIN>("STORAGE_MAIN_SELECT_BY_TEMPLATE_ID", TEMPLATE_ID);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 新建
|
|
/// </summary>
|
|
public int Add(STORAGE_MAIN storage_main)
|
|
{
|
|
//int id = this.GetPrimaryID("STORAGE_MAIN","STORAGE_MAIN_ID");
|
|
//storage_main.STORAGE_ID = id;
|
|
|
|
return ExecuteInsert("STORAGE_MAIN_INSERT",storage_main);
|
|
}
|
|
/// <summary>
|
|
/// 修改
|
|
/// </summary>
|
|
public int Update(STORAGE_MAIN storage_main)
|
|
{
|
|
return ExecuteUpdate("STORAGE_MAIN_UPDATE",storage_main);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到明细
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
public STORAGE_MAIN GetModel(System.Int32 STORAGE_ID)
|
|
{
|
|
return ExecuteQueryForObject<STORAGE_MAIN>("STORAGE_MAIN_SELECT_BY_ID",STORAGE_ID);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到明细
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
public STORAGE_MAIN GetModelCellIDStockBarcode(System.Int32 CELL_ID, string STOCK_BARCODE)
|
|
{
|
|
Hashtable ht = new Hashtable();
|
|
|
|
ht.Add("CELL_ID", CELL_ID);
|
|
|
|
ht.Add("STOCK_BARCODE", STOCK_BARCODE);
|
|
|
|
return this.ExecuteQueryForObject<STORAGE_MAIN>("STORAGE_MAIN_SELECT_BY_CELL_ID_STOCK_BARCODE", ht);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到明细
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
public STORAGE_MAIN GetModelStockBarcode(string STOCK_BARCODE)
|
|
{
|
|
return this.ExecuteQueryForObject<STORAGE_MAIN>("STORAGE_MAIN_SELECT_BY_STOCK_BARCODE", STOCK_BARCODE);
|
|
}
|
|
|
|
public STORAGE_MAIN GetModelCellID(int CELL_ID)
|
|
{
|
|
return this.ExecuteQueryForObject<STORAGE_MAIN>("STORAGE_MAIN_SELECT_BY_CELL_ID", CELL_ID);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 删除
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
public int Delete(System.Int32 STORAGE_ID)
|
|
{
|
|
return ExecuteDelete("STORAGE_MAIN_DELETE",STORAGE_ID);
|
|
}
|
|
|
|
|
|
}
|
|
}
|