天津投入产出系统后端
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.
 
 
 
 
 
 

93 lines
2.4 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMFrameWork.Data;
using QMAPP.Entity.Sys;
using System.Data;
namespace QMAPP.DAL.Sys
{
/// <summary>
/// 支持交互参数设置
/// 创建者:wangyf
/// 创建日期:2015.03.30
/// </summary>
public class SIParamSetDAL : BaseDAL
{
#region 获取支持交互参数设置
/// <summary>
/// 获取支持交互参数设置
/// </summary>
/// <returns>数据页</returns>
public SIParamSet Get(SIParamSet paramSet)
{
StringBuilder sb = new StringBuilder();
try
{
sb.Append(" SELECT * FROM T_QM_PARAMSET");
using (IDataSession session = AppDataFactory.CreateMainSession())
{
string sql = this.ChangeSqlByDB(sb.ToString(), session);
paramSet = session.Get<SIParamSet>(sql, new List<DataParameter>().ToArray());
}
return paramSet;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 保存支持交互参数设置
/// <summary>
/// 保存支持交互参数设置
/// </summary>
/// <returns>数据页</returns>
public int SaveSIParamSet(SIParamSet paramSet)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
count = session.Insert<SIParamSet>(paramSet);
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新支持交互参数设置
/// <summary>
/// 更新支持交互参数设置
/// </summary>
/// <returns>数据页</returns>
public int UpdateSIParamSet(SIParamSet paramSet)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
count = session.Update<SIParamSet>(paramSet);
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}