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
2.1 KiB
72 lines
2.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using QMAPP.FJC.Entity.CellCycle;
|
|
using QMFrameWork.Data;
|
|
using QMAPP.DAL;
|
|
using QMFrameWork.Log;
|
|
|
|
namespace QMAPP.FJC.DAL.CellCycle
|
|
{
|
|
public class CellCycleTimeSetDAL : BaseDAL
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public List<CellCycleTimeSet> GetList()
|
|
{
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
string sql = "SELECT * FROM T_SA_CELLCYCLETIMESET ";
|
|
if (BaseSession != null)
|
|
{
|
|
return BaseSession.GetList<CellCycleTimeSet>(sql, parameters.ToArray()).ToList();
|
|
}
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
return session.GetList<CellCycleTimeSet>(sql, parameters.ToArray()).ToList();
|
|
}
|
|
}
|
|
|
|
|
|
#region 插入信息
|
|
/// <summary>
|
|
/// 插入信息
|
|
/// </summary>
|
|
/// <param name="">信息</param>
|
|
/// <returns>插入行数</returns>
|
|
public int Insert(CellCycleTime model)
|
|
{
|
|
int count = 0;
|
|
try
|
|
{
|
|
if (BaseSession != null)
|
|
{
|
|
//插入基本信息
|
|
count = BaseSession.Insert<CellCycleTime>(model);
|
|
}
|
|
else
|
|
{
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
//插入基本信息
|
|
count = session.Insert<CellCycleTime>(model);
|
|
}
|
|
}
|
|
return count;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "信息数据层-插入信息"
|
|
});
|
|
throw;
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
}
|
|
|