天津投入产出系统后端
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.
 
 
 
 
 
 

77 lines
1.9 KiB

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
{
/// <summary>
/// 宝来升级路由数据层
/// </summary>
public class BoraUpgradeRouteDAL
{
#region 根据ProductCode提取产品实例
/// <summary>
/// 获取全部宝来升级路由列表
/// </summary>
/// <returns></returns>
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;
}
/// <summary>
/// 根据工位编码获取宝来升级路由实例
/// </summary>
/// <param name="WorkCell_Code">工位编码</param>
/// <returns></returns>
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
}
}