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.
670 lines
24 KiB
670 lines
24 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using QMAPP.FJC.Entity.Equipment;
|
|
using QMFrameWork.Data;
|
|
using QMFrameWork.Log;
|
|
using System.Data;
|
|
using QMAPP.DAL;
|
|
using QMAPP.FJC.Entity.MaximoDataDB;
|
|
|
|
namespace QMAPP.FJC.DAL.Equipment
|
|
{
|
|
public class MouldDAL : BaseDAL
|
|
{
|
|
#region 获取信息
|
|
/// <summary>
|
|
/// 获取信息
|
|
/// </summary>
|
|
/// <param name="">条件</param>
|
|
/// <returns>信息</returns>
|
|
public Mould Get(Mould model)
|
|
{
|
|
try
|
|
{
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
//获取信息
|
|
model = session.Get<Mould>(model);
|
|
}
|
|
return model;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "模具信息数据层-获取信息"
|
|
});
|
|
throw;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 获取列表
|
|
/// <summary>
|
|
/// 获取列表
|
|
/// </summary>
|
|
/// <param name="condition">条件</param>
|
|
/// <param name="page">数据页</param>
|
|
/// <returns>数据页</returns>
|
|
public DataPage GetList(Mould condition, DataPage page)
|
|
{
|
|
string sql = null;
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
try
|
|
{
|
|
sql = this.GetQuerySql(condition, ref parameters);
|
|
//分页关键字段及排序
|
|
page.KeyName = "PID";
|
|
page.SortExpression = "MOULD_CODE DESC";
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
page = session.GetDataPage<Mould>(sql, parameters.ToArray(), page);
|
|
}
|
|
return page;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "公司信息数据层-获取列表"
|
|
});
|
|
throw;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取列表
|
|
/// </summary>
|
|
/// <param name="condition">条件</param>
|
|
/// <returns>全部集合</returns>
|
|
public List<Mould> GetAllList(Mould condition)
|
|
{
|
|
List<Mould> list = new List<Mould>();
|
|
string sql = null;
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
try
|
|
{
|
|
sql = this.GetQuerySql(condition, ref parameters);
|
|
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
list = session.GetList<Mould>(sql, parameters.ToArray()).ToList();
|
|
}
|
|
return list;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "操作者数据层-获取模具列表"
|
|
});
|
|
throw;
|
|
}
|
|
}
|
|
public List<Mould> GetMoulds()
|
|
{
|
|
List<Mould> list = new List<Mould>();
|
|
string sql = null;
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
try
|
|
{
|
|
sql = "select * from T_EQP_MOULD";
|
|
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
list = session.GetList<Mould>(sql, parameters.ToArray()).ToList();
|
|
}
|
|
return list;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogManager.LogHelper.Error(new LogInfo()
|
|
{
|
|
ErrorInfo = ex,
|
|
Tag = ex.StackTrace,
|
|
Info = "操作者数据层-获取模具列表"
|
|
});
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 获取查询语句
|
|
/// <summary>
|
|
/// 获取查询语句
|
|
/// </summary>
|
|
/// <param name="user">查询条件</param>
|
|
/// <param name="parameters">参数</param>
|
|
/// <returns>查询语句</returns>
|
|
private string GetQuerySql(Mould condition, ref List<DataParameter> parameters)
|
|
{
|
|
StringBuilder sqlBuilder = new StringBuilder();
|
|
StringBuilder whereBuilder = new StringBuilder();
|
|
try
|
|
{
|
|
//构成查询语句
|
|
sqlBuilder.AppendLine(" SELECT M.PID ");
|
|
sqlBuilder.AppendLine(" ,M.MOULD_NAME ");
|
|
sqlBuilder.AppendLine(" ,M.MOULD_CODE ");
|
|
sqlBuilder.AppendLine(" ,M.MoldDataName ");
|
|
sqlBuilder.AppendLine(" ,M.MOULD_TYPE ");
|
|
sqlBuilder.AppendLine(" ,M.MATERIAL_CODE ");
|
|
sqlBuilder.AppendLine(" ,MN.MATERIAL_NAME ");
|
|
sqlBuilder.AppendLine(" ,M.WORKCENTER_CODE ");
|
|
sqlBuilder.AppendLine(" ,W.WORKCENTER_NAME ");
|
|
sqlBuilder.AppendLine(" ,M.MACHINE_PID ");
|
|
sqlBuilder.AppendLine(" ,MAC.MACHINENAME ");
|
|
sqlBuilder.AppendLine(" ,M.FACTORY_CODE ");
|
|
sqlBuilder.AppendLine(" ,F.FACTORY_NAME ");
|
|
sqlBuilder.AppendLine(" ,M.MOULD_STATE ");
|
|
sqlBuilder.AppendLine(" ,M.USAGECOUNT ");
|
|
sqlBuilder.AppendLine(" ,M.MAXIMO_SYNC ");
|
|
sqlBuilder.AppendLine(" ,M.SYNC_DATE ");
|
|
sqlBuilder.AppendLine(" ,M.CREATEUSER ");
|
|
sqlBuilder.AppendLine(" ,M.CREATEDATE ");
|
|
sqlBuilder.AppendLine(" ,M.UPDATEUSER ");
|
|
sqlBuilder.AppendLine(" ,M.UPDATEDATE ");
|
|
sqlBuilder.AppendLine(" ,C.USERNAME AS CREATEUSERNAME ");
|
|
sqlBuilder.AppendLine(" ,U.USERNAME AS UPDATEUSERNAME ");
|
|
sqlBuilder.AppendLine(" FROM T_EQP_MOULD M ");
|
|
sqlBuilder.AppendLine(" LEFT JOIN T_MD_MATERIAL MN ON MN.MATERIAL_CODE=M.MATERIAL_CODE ");
|
|
sqlBuilder.AppendLine(" LEFT JOIN T_MD_WORKCENTER W ON W.WORKCENTER_CODE=M.WORKCENTER_CODE ");
|
|
sqlBuilder.AppendLine(" LEFT JOIN T_MD_FACTORY F ON F.FACTORY_CODE=M.FACTORY_CODE ");
|
|
sqlBuilder.AppendLine(" LEFT JOIN T_BD_MACHINEINFO MAC ON MAC.PID=M.MACHINE_PID ");
|
|
sqlBuilder.AppendLine(" LEFT JOIN T_QM_USER C ON C.USERID=M.CREATEUSER ");
|
|
sqlBuilder.AppendLine(" LEFT JOIN T_QM_USER U ON U.USERID=M.UPDATEUSER ");
|
|
|
|
//查询条件
|
|
//模具号
|
|
if (string.IsNullOrEmpty(condition.MOULD_CODE) == false)
|
|
{
|
|
whereBuilder.Append(" AND MOULD_CODE = @MOULD_CODE ");
|
|
parameters.Add(new DataParameter { ParameterName = "MOULD_CODE", DataType = DbType.String, Value = condition.MOULD_CODE });
|
|
}
|
|
//模具名称
|
|
if (string.IsNullOrEmpty(condition.MOULD_NAME) == false)
|
|
{
|
|
whereBuilder.Append(" AND MOULD_NAME = @MOULD_NAME ");
|
|
parameters.Add(new DataParameter { ParameterName = "MOULD_NAME", DataType = DbType.String, Value = condition.MOULD_NAME });
|
|
}
|
|
//模具资料
|
|
if (string.IsNullOrEmpty(condition.MoldDataName) == false)
|
|
{
|
|
whereBuilder.Append(" AND M.MoldDataName = @MoldDataName ");
|
|
parameters.Add(new DataParameter { ParameterName = "MoldDataName", DataType = DbType.String, Value = condition.MoldDataName });
|
|
}
|
|
//物料号
|
|
if (string.IsNullOrEmpty(condition.MATERIAL_CODE) == false)
|
|
{
|
|
whereBuilder.Append(" AND M.MATERIAL_CODE = @MATERIAL_CODE ");
|
|
parameters.Add(new DataParameter { ParameterName = "MATERIAL_CODE", DataType = DbType.String, Value = condition.MATERIAL_CODE });
|
|
}
|
|
//工作中心编号
|
|
if (string.IsNullOrEmpty(condition.WORKCENTER_CODE) == false)
|
|
{
|
|
whereBuilder.Append(" AND M.WORKCENTER_CODE = @WORKCENTER_CODE ");
|
|
parameters.Add(new DataParameter { ParameterName = "WORKCENTER_CODE", DataType = DbType.String, Value = condition.WORKCENTER_CODE });
|
|
}
|
|
//工厂编号
|
|
if (string.IsNullOrEmpty(condition.FACTORY_CODE) == false)
|
|
{
|
|
whereBuilder.Append(" AND M.FACTORY_CODE = @FACTORY_CODE ");
|
|
parameters.Add(new DataParameter { ParameterName = "FACTORY_CODE", DataType = DbType.String, Value = condition.FACTORY_CODE });
|
|
}
|
|
|
|
if (whereBuilder.Length > 0)
|
|
{
|
|
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4));
|
|
}
|
|
return sqlBuilder.ToString();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 信息是否重复
|
|
/// <summary>
|
|
/// 判断模具号是否存在
|
|
/// </summary>
|
|
/// <param name="info"></param>
|
|
/// <returns>true:已存在;fasel:不存在。</returns>
|
|
public bool ExistsMould(Mould model)
|
|
{
|
|
string PID = "";
|
|
int count = 0;
|
|
StringBuilder sqlBuilder = new StringBuilder();
|
|
|
|
try
|
|
{
|
|
if (string.IsNullOrEmpty(model.PID) == false)
|
|
{
|
|
PID = model.PID;
|
|
}
|
|
sqlBuilder.AppendLine("SELECT COUNT(*) FROM T_EQP_MOULD ");
|
|
sqlBuilder.AppendLine(" WHERE PID <> @PID AND MOULD_CODE=@MOULD_CODE");
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(),
|
|
new DataParameter("PID", PID),
|
|
new DataParameter { ParameterName = "MOULD_CODE", Value = model.MOULD_CODE }));
|
|
}
|
|
if (count > 0)
|
|
{
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 插入信息
|
|
/// <summary>
|
|
/// 插入信息(单表)
|
|
/// </summary>
|
|
/// <param name="">信息</param>
|
|
/// <returns>插入行数</returns>
|
|
public int Insert(Mould model)
|
|
{
|
|
int count = 0;
|
|
try
|
|
{
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
//插入基本信息
|
|
count = session.Insert<Mould>(model);
|
|
}
|
|
return count;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 更新信息
|
|
/// <summary>
|
|
/// 更新信息
|
|
/// </summary>
|
|
/// <param name=""></param>
|
|
/// <returns>更新行数</returns>
|
|
public int Update(Mould model)
|
|
{
|
|
try
|
|
{
|
|
if (BaseSession!=null)
|
|
{
|
|
return BaseSession.Update<Mould>(model);
|
|
}
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
//更新基本信息
|
|
return session.Update<Mould>(model);
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 删除
|
|
/// <summary>
|
|
/// 删除信息
|
|
/// </summary>
|
|
/// <param name=""></param>
|
|
/// <returns>删除个数</returns
|
|
public int Delete(Mould model)
|
|
{
|
|
int count = 0;
|
|
try
|
|
{
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
//删除基本信息
|
|
count = session.Delete<Mould>(model);
|
|
}
|
|
return count;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 获取模具资料维护列表
|
|
/// <summary>
|
|
/// 获取模具资料维护
|
|
/// </summary>
|
|
/// <param name="condition">条件</param>
|
|
/// <param name="page">数据页</param>
|
|
/// <returns>数据页</returns>
|
|
public DataPage GetMouldData(MouldData condition, DataPage page)
|
|
{
|
|
string sql = null;
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
try
|
|
{
|
|
sql = this.GetMouldDataSql(condition, ref parameters);
|
|
|
|
#region 排序
|
|
//分页关键字段及排序
|
|
page.KeyName = "PID";
|
|
if (string.IsNullOrEmpty(page.SortExpression))
|
|
{
|
|
page.SortExpression = "UPDATEDATE DESC";
|
|
}
|
|
#endregion
|
|
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
// 对应多种数据库
|
|
string sqlChange = this.ChangeSqlByDB(sql, session);
|
|
page = session.GetDataPage<MouldData>(sqlChange, parameters.ToArray(), page);
|
|
}
|
|
return page;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
RecordExceptionLog(ex, "模具资料维护-获取列表");
|
|
throw ex;
|
|
}
|
|
}
|
|
public MouldData GetMouldCode(MouldData condition)
|
|
{
|
|
string sql = null;
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
try
|
|
{
|
|
sql = this.GetMouldDataSql(condition, ref parameters);
|
|
|
|
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
return session.Get<MouldData>(sql, parameters.ToArray());
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
RecordExceptionLog(ex, "模具资料维护-获取列表");
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region 获取查询语句
|
|
/// <summary>
|
|
/// 获取查询语句
|
|
/// </summary>
|
|
/// <param name="user">查询条件</param>
|
|
/// <param name="parameters">参数</param>
|
|
/// <returns>查询语句</returns>
|
|
private string GetMouldDataSql(MouldData condition, ref List<DataParameter> parameters)
|
|
{
|
|
StringBuilder sqlBuilder = new StringBuilder();
|
|
StringBuilder whereBuilder = new StringBuilder();
|
|
try
|
|
{
|
|
sqlBuilder.AppendLine(@" SELECT PID
|
|
,MOULD_ID
|
|
,MOULDDATA_CODE
|
|
,MOULDDATA_NAME
|
|
,MEMO
|
|
,CREATEUSER
|
|
,CREATEDATE
|
|
,UPDATEUSER
|
|
,UPDATEDATE
|
|
FROM T_EQP_MOULDDATA ");
|
|
if (string.IsNullOrEmpty(condition.MOULD_ID) == false)
|
|
{
|
|
whereBuilder.Append(" AND MOULD_ID = @MOULD_ID");
|
|
parameters.Add(new DataParameter { ParameterName = "MOULD_ID", DataType = DbType.String, Value = condition.MOULD_ID });
|
|
}
|
|
if (string.IsNullOrEmpty(condition.MOULDDATA_CODE) == false)
|
|
{
|
|
whereBuilder.Append(" AND MOULDDATA_CODE = @MOULDDATA_CODE");
|
|
parameters.Add(new DataParameter { ParameterName = "MOULDDATA_CODE", DataType = DbType.String, Value = condition.MOULDDATA_CODE });
|
|
}
|
|
//查询条件
|
|
|
|
if (whereBuilder.Length > 0)
|
|
{
|
|
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4));
|
|
}
|
|
return sqlBuilder.ToString();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 插入模具资料维护信息
|
|
/// <summary>
|
|
/// 插入模具资料维护信息(单表)
|
|
/// </summary>
|
|
/// <param name=model"">模具资料维护信息</param>
|
|
/// <returns>插入行数</returns>
|
|
public int InsertMouldData(MouldData model)
|
|
{
|
|
int count = 0;
|
|
try
|
|
{
|
|
if (BaseSession != null)
|
|
{
|
|
//插入基本信息
|
|
count = BaseSession.Insert<MouldData>(model);
|
|
}
|
|
else
|
|
{
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
//插入基本信息
|
|
count = session.Insert<MouldData>(model);
|
|
}
|
|
}
|
|
return count;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
RecordExceptionLog(ex, "插入模具资料维护信息");
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 信息是否重复
|
|
/// <summary>
|
|
/// 判断模具资料编码是否存在
|
|
/// </summary>
|
|
/// <param name="info"></param>
|
|
/// <returns>true:已存在;fasel:不存在。</returns>
|
|
public bool ExistsMouldData(MouldData model)
|
|
{
|
|
string PID = "";
|
|
int count = 0;
|
|
StringBuilder sqlBuilder = new StringBuilder();
|
|
|
|
try
|
|
{
|
|
if (string.IsNullOrEmpty(model.PID) == false)
|
|
{
|
|
PID = model.PID;
|
|
}
|
|
sqlBuilder.AppendLine("SELECT COUNT(*) FROM T_EQP_MOULDDATA ");
|
|
sqlBuilder.AppendLine(" WHERE PID <> @PID AND MOULDDATA_CODE=@MOULDDATA_CODE ");
|
|
//sqlBuilder.AppendLine(" OR MOULDDATA_NAME=@MOULDDATA_NAME ");
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(),
|
|
new DataParameter("PID", PID),
|
|
new DataParameter { ParameterName = "MOULDDATA_CODE", Value = model.MOULDDATA_CODE }));
|
|
}
|
|
if (count > 0)
|
|
{
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
/// 判断模具资料名称是否存在
|
|
/// </summary>
|
|
/// <param name="info"></param>
|
|
/// <returns>true:已存在;fasel:不存在。</returns>
|
|
public bool ExistsMouldnameData(MouldData model)
|
|
{
|
|
string PID = "";
|
|
int count = 0;
|
|
StringBuilder sqlBuilder = new StringBuilder();
|
|
|
|
try
|
|
{
|
|
if (string.IsNullOrEmpty(model.PID) == false)
|
|
{
|
|
PID = model.PID;
|
|
}
|
|
sqlBuilder.AppendLine("SELECT COUNT(*) FROM T_EQP_MOULDDATA ");
|
|
sqlBuilder.AppendLine(" WHERE PID <> @PID AND MOULDDATA_NAME=@MOULDDATA_NAME ");
|
|
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(),
|
|
new DataParameter("PID", PID),
|
|
new DataParameter { ParameterName = "MOULDDATA_NAME", Value = model.MOULDDATA_NAME }));
|
|
}
|
|
if (count > 0)
|
|
{
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 删除模具资料维护信息
|
|
/// <summary>
|
|
/// 删除信息
|
|
/// </summary>
|
|
/// <param name=""></param>
|
|
/// <returns>删除个数</returns
|
|
|
|
public int DeleteMouldData(MouldData model)
|
|
{
|
|
int count = 0;
|
|
try
|
|
{
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
//删除基本信息
|
|
count = session.Delete<MouldData>(model);
|
|
}
|
|
return count;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 获取导出的数据
|
|
/// <summary>
|
|
/// 获取导出的数据
|
|
/// </summary>
|
|
/// <param name="user">查询条件</param>
|
|
/// <returns>数据</returns>
|
|
public DataTable GetExportData(Mould model)
|
|
{
|
|
DataTable dt = null;
|
|
string sql = null;
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
try
|
|
{
|
|
//构成查询语句
|
|
sql = this.GetQuerySql(model, ref parameters);
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
dt = session.GetTable(sql, parameters.ToArray());
|
|
dt.TableName = "MouldExp";
|
|
}
|
|
return dt;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
public int InsertMouldCounter(MounldCounter model, IDataSession Bsession)
|
|
{
|
|
return Bsession.Insert(model);
|
|
}
|
|
|
|
//获取中间表T_QT_EQUIPMENTINFO的数据;
|
|
public List<EquipmentInfo> GetSelectEquipmentInfo(string equipmentType)
|
|
{
|
|
if (string.IsNullOrEmpty(equipmentType))
|
|
{
|
|
return null;
|
|
}
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
string sql = "SELECT * FROM T_QT_EQUIPMENTINFO WHERE EQUIPMENTTYPE= '" + equipmentType + "'";
|
|
using (IDataSession session = AppDataFactory.CreateSession("maindbMaximo"))
|
|
{
|
|
return session.GetList<EquipmentInfo>(sql, parameters.ToArray()).ToList();
|
|
}
|
|
}
|
|
|
|
//public DataPage GetMouldData(MouldData condition, DataPage page)
|
|
//{
|
|
// throw new NotImplementedException();
|
|
//}
|
|
|
|
//public int InsertMouldData(MouldData model)
|
|
//{
|
|
// throw new NotImplementedException();
|
|
//}
|
|
}
|
|
}
|
|
|