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.
91 lines
2.0 KiB
91 lines
2.0 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>
|
|
/// RECORD_MAIN
|
|
/// </summary>
|
|
public class P_RECORD_MAIN : P_Base_House
|
|
{
|
|
public P_RECORD_MAIN ()
|
|
{
|
|
//
|
|
// TODO: 此处添加RECORD_MAIN的构造函数
|
|
//
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到列表
|
|
/// </summary>
|
|
public IList<RECORD_MAIN> GetList()
|
|
{
|
|
return ExecuteQueryForList<RECORD_MAIN>("RECORD_MAIN_SELECT",null);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 得到列表
|
|
/// </summary>
|
|
public IList<RECORD_MAIN> GetListPlanCode(string PLAN_CODE)
|
|
{
|
|
return ExecuteQueryForList<RECORD_MAIN>("RECORD_MAIN_SELECT_BY_PLAN_CODE", PLAN_CODE);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 新建
|
|
/// </summary>
|
|
public int Add(RECORD_MAIN record_main)
|
|
{
|
|
//int id = this.GetPrimaryID("RECORD_MAIN","RECORD_MAIN_ID");
|
|
//record_main.RECORD_ID = id;
|
|
|
|
return ExecuteInsert("RECORD_MAIN_INSERT",record_main);
|
|
}
|
|
/// <summary>
|
|
/// 修改
|
|
/// </summary>
|
|
public int Update(RECORD_MAIN record_main)
|
|
{
|
|
return ExecuteUpdate("RECORD_MAIN_UPDATE",record_main);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到明细
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
public RECORD_MAIN GetModel(System.Int32 RECORD_ID)
|
|
{
|
|
return ExecuteQueryForObject<RECORD_MAIN>("RECORD_MAIN_SELECT_BY_ID",RECORD_ID);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
public int Delete(System.Int32 RECORD_ID)
|
|
{
|
|
return ExecuteDelete("RECORD_MAIN_DELETE",RECORD_ID);
|
|
}
|
|
|
|
|
|
}
|
|
}
|