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.
101 lines
2.4 KiB
101 lines
2.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>
|
|
/// PLAN_MAIN
|
|
/// </summary>
|
|
public class P_PLAN_MAIN : P_Base_House
|
|
{
|
|
public P_PLAN_MAIN ()
|
|
{
|
|
//
|
|
// TODO: 此处添加PLAN_MAIN的构造函数
|
|
//
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到列表
|
|
/// </summary>
|
|
public IList<PLAN_MAIN> GetList()
|
|
{
|
|
return ExecuteQueryForList<PLAN_MAIN>("PLAN_MAIN_SELECT",null);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 新建
|
|
/// </summary>
|
|
public int Add(PLAN_MAIN plan_main)
|
|
{
|
|
//int id = this.GetPrimaryID("PLAN_MAIN","PLAN_MAIN_ID");
|
|
//plan_main.PLAN_ID = id;
|
|
|
|
return ExecuteInsert("PLAN_MAIN_INSERT",plan_main);
|
|
}
|
|
/// <summary>
|
|
/// 修改
|
|
/// </summary>
|
|
public int Update(PLAN_MAIN plan_main)
|
|
{
|
|
return ExecuteUpdate("PLAN_MAIN_UPDATE",plan_main);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到明细
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
public PLAN_MAIN GetModel(System.Int32 PLAN_ID)
|
|
{
|
|
return ExecuteQueryForObject<PLAN_MAIN>("PLAN_MAIN_SELECT_BY_ID",PLAN_ID);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到明细
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
public PLAN_MAIN GetModelPlanCode(string PLAN_CODE)
|
|
{
|
|
return this.ExecuteQueryForObject<PLAN_MAIN>("PLAN_MAIN_SELECT_BY_PLAN_CODE", PLAN_CODE);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 得到明细
|
|
/// </summary>
|
|
/// <param name="plan_flag"></param>
|
|
/// <returns></returns>
|
|
public IList<PLAN_MAIN> GetModelPlanFlag(string PLAN_FLAG)
|
|
{
|
|
return ExecuteQueryForList<PLAN_MAIN>("PLAN_MAIN_SELECT_BY_PLAN_FLAG", PLAN_FLAG);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
public int Delete(System.Int32 PLAN_ID)
|
|
{
|
|
return ExecuteDelete("PLAN_MAIN_DELETE",PLAN_ID);
|
|
}
|
|
|
|
|
|
}
|
|
}
|