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.
71 lines
2.0 KiB
71 lines
2.0 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data;
|
|
using ICSSoft.Frame.Data.DAL;
|
|
using ICSSoft.Frame.Data.Entity;
|
|
|
|
namespace ICSSoft.Frame.Data.BLL
|
|
{
|
|
public class ICSMaterialPickBLL
|
|
{
|
|
public static void Start(string Appconstr, ICSLOTSIMULATION simulation)
|
|
{
|
|
FramDataContext db = new FramDataContext(Appconstr);
|
|
db.Connection.Open();
|
|
db.Transaction = db.Connection.BeginTransaction();
|
|
try
|
|
{
|
|
if (string.IsNullOrWhiteSpace(Appconstr))
|
|
throw new Exception("连接字符串不能为空!");
|
|
|
|
//校验传入数据是否符合采集要求
|
|
ICSMaterialPickDAL.CheckInfo(db, simulation);
|
|
//保存数据
|
|
ICSMaterialPickDAL.SaveStart(db, simulation);
|
|
|
|
db.SubmitChanges();
|
|
db.Transaction.Commit();
|
|
db.Connection.Close();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
db.Transaction.Rollback();
|
|
db.Connection.Close();
|
|
throw ex;
|
|
}
|
|
}
|
|
#region 根据工单查询子件机汇总信息
|
|
public static DataSet select(String MOCode, String TransNO, String Appconstr)
|
|
{
|
|
try
|
|
{
|
|
return ICSMaterialPickDAL.select(MOCode, TransNO, Appconstr);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message);
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 根据工单查询拣料表信息
|
|
public static DataSet GetGauge(String MOCode, String Appconstr)
|
|
{
|
|
try
|
|
{
|
|
return ICSMaterialPickDAL.GetGauge(MOCode, Appconstr);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception(ex.Message);
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
}
|
|
}
|