using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//Ref:
using System.Data;
using QMAPP.BoraUpgrade.Common;
using QMAPP.BoraUpgrade.Entity;
namespace QMAPP.BoraUpgrade.DAL
{
///
/// 宝来升级路由数据层
///
public class BoraUpgradeRouteDAL
{
#region 根据ProductCode提取产品实例
///
/// 获取全部宝来升级路由列表
///
///
public static DataTable GetBoraUpgradeRouteList()
{
DataTable returnVal = new DataTable();
string sqlScript =
@"
Select
*
From [dbo].[T_QD_BoraUpgradeRoute]
Where IsDeleted = 0
";
DataSet dataSet = SqlHelper.ExecuteDataset(
Config.maindbConnectionString, CommandType.Text, sqlScript );
if ( dataSet.Tables.Count > 0 )
{
returnVal = dataSet.Tables[0];
}
return returnVal;
}
///
/// 根据工位编码获取宝来升级路由实例
///
/// 工位编码
///
public static DataTable GetBoraUpgradeRouteByWorkCell(string WorkCell_Code)
{
DataTable returnVal = new DataTable();
string sqlScript =
@"
Select
Top 1 *
From [dbo].[T_QD_BoraUpgradeRoute]
Where IsDeleted = 0
And WorkCell_Code = '{0}'
";
DataSet dataSet = SqlHelper.ExecuteDataset(
Config.maindbConnectionString, CommandType.Text, string.Format(sqlScript,WorkCell_Code) );
if (dataSet.Tables.Count > 0)
{
returnVal = dataSet.Tables[0];
}
return returnVal;
}
#endregion
}
}