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 { /// /// /// /// public List GetList() { List parameters = new List(); string sql = "SELECT * FROM T_SA_CELLCYCLETIMESET "; if (BaseSession != null) { return BaseSession.GetList(sql, parameters.ToArray()).ToList(); } using (IDataSession session = AppDataFactory.CreateMainSession()) { return session.GetList(sql, parameters.ToArray()).ToList(); } } #region 插入信息 /// /// 插入信息 /// /// 信息 /// 插入行数 public int Insert(CellCycleTime model) { int count = 0; try { if (BaseSession != null) { //插入基本信息 count = BaseSession.Insert(model); } else { using (IDataSession session = AppDataFactory.CreateMainSession()) { //插入基本信息 count = session.Insert(model); } } return count; } catch (Exception ex) { LogManager.LogHelper.Error(new LogInfo() { ErrorInfo = ex, Tag = ex.StackTrace, Info = "信息数据层-插入信息" }); throw; } } #endregion } }