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.
57 lines
1.8 KiB
57 lines
1.8 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using QMAPP.DAL;
|
|
using QMAPP.FJC.Entity.Common.Constants;
|
|
using QMAPP.FJC.Entity.CompleteStatistics;
|
|
using QMAPP.FJC.Entity.MesB9;
|
|
using QMFrameWork.Data;
|
|
|
|
namespace QMAPP.FJC.DAL.MesB9
|
|
{
|
|
public class MesB9M110DAL : BaseDAL
|
|
{
|
|
|
|
public List<MesB9M110Entity> GetList()
|
|
{
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
string sql = "SELECT * FROM Mes_B9_M110 WHERE ReadFlag=0";
|
|
if (BaseSession != null)
|
|
{
|
|
return BaseSession.GetList<MesB9M110Entity>(sql, parameters.ToArray()).ToList();
|
|
}
|
|
using (IDataSession session = AppDataFactory.CreateSession("maindbSelect"))
|
|
{
|
|
return session.GetList<MesB9M110Entity>(sql, parameters.ToArray()).ToList();
|
|
}
|
|
}
|
|
|
|
public int Update(MesB9M110Entity model)
|
|
{
|
|
if (BaseSession != null)
|
|
{
|
|
//同步插入本地数据库
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
var sql =
|
|
"insert into [ADIENT_QD_MES].[dbo].[Mes_B9_M110]([seq],[kin],[vin],[m110dtm],[ProdNo],[assemblyline],[sysdtm],[ReadFlag]) values('" + model.seq + "','" + model.kin + "','" + model.vin + "','" + model.m110dtm + "','" + model.ProdNo + "','" + model.assemblyline + "','" + DateTime.Now + "'," + model.ReadFlag + ")";
|
|
BaseSession.ExecuteSql(sql, parameters.ToArray());
|
|
|
|
//插入基本信息
|
|
return BaseSession.Update(model);
|
|
}
|
|
using (IDataSession session = AppDataFactory.CreateSession("maindbSelect"))
|
|
{
|
|
return session.Update(model);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|