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

72 lines
1.7 KiB

using System;
using System.Data;
using System.Collections.Generic;
using QMFrameWork.Data;
using QMAPP.Entity.Sys;
namespace QMAPP.DAL.Sys
{
/// <summary>
/// 个行设置数据层对象
/// 创建者:李炳海
/// 创建日期:2015.2.25
/// </summary>
public class PersnalSetDAL:BaseDAL
{
#region 获取个性设置信息
/// <summary>
/// 获取个性设置信息
/// </summary>
/// <param name="userID">用户主键</param>
/// <returns>个性设置信息</returns>
public PersnalSet Get(string userID)
{
PersnalSet info = null;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
info = session.Get<PersnalSet>(new PersnalSet {USERID=userID });
}
return info;
}
catch (Exception ex)
{
throw;
}
}
#endregion
#region 保存个性设置信息
/// <summary>
/// 保存个性设置信息
/// </summary>
/// <param name="info">个性设置信息</param>
public void Save(PersnalSet info)
{
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
session.OpenTs();
session.Delete<PersnalSet>(info);
session.Insert<PersnalSet>(info);
session.CommitTs();
}
}
catch (Exception ex)
{
throw;
}
}
#endregion
}
}