/***************************************************************************
*
* 功能: 持久层基类
* 作者: 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;
///
/// SYS_RELATION
///
public class P_SYS_RELATION : P_Base_House
{
public P_SYS_RELATION ()
{
//
// TODO: 此处添加SYS_RELATION的构造函数
//
}
///
/// 得到列表
///
public IList GetList()
{
return ExecuteQueryForList("SYS_RELATION_SELECT",null);
}
///
/// 新建
///
public int Add(SYS_RELATION sys_relation)
{
//int id = this.GetPrimaryID("SYS_RELATION","SYS_RELATION_ID");
//sys_relation.RELATION_ID = id;
return ExecuteInsert("SYS_RELATION_INSERT",sys_relation);
}
///
/// 修改
///
public int Update(SYS_RELATION sys_relation)
{
return ExecuteUpdate("SYS_RELATION_UPDATE",sys_relation);
}
///
/// 得到明细
///
///
///
public SYS_RELATION GetModelRelationCode(string RELATION_CODE)
{
return ExecuteQueryForObject("SYS_RELATION_SELECT_BY_RELATION_CODE", RELATION_CODE);
}
///
/// 删除
///
///
public int Delete(System.Int32 RELATION_ID)
{
return ExecuteDelete("SYS_RELATION_DELETE",RELATION_ID);
}
}
}