You cannot 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
2.6 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ApServerProvider;
using System.Data;
using System.Text;
using System.Collections;
using Estsh.Web.Util;
namespace Estsh.Core.Repositories
{
public class LotDefine:BaseApp
{
/***************************************************************************************************
*
* 作者:张茂忠
* 创建时间2013.05.2
* 描述批次追溯查询模块DAL层
* 修改日志:
*
*
* *************************************************************************************************/
public LotDefine(RemotingProxy remotingProxy)
: base(remotingProxy)
{ }
/// <summary>
/// 根据查询条件得出结果集
/// </summary>
/// <param name="aWhere">查询条件</param>
/// <returns>符合条件的结果集</returns>
public ArrayList GetQuery(string Strwhere ,ref DataTable dt)
{
lock (_remotingProxy)
{
StringBuilder SqlStringBuilder = new StringBuilder(1024);
SqlStringBuilder.Append("SELECT a.car_no,a.serial_number,a.part_no,a.item_part_no,lot_no, ");
SqlStringBuilder.Append(" b.part_spec ");
SqlStringBuilder.Append("FROM dbo.g_move_trans(NOLOCK) a ");
SqlStringBuilder.Append(" LEFT JOIN dbo.sys_part(NOLOCK) b ON a.part_no = b.part_no ");
SqlStringBuilder.Append("WHERE 0=0 " + Strwhere);
dt = _remotingProxy.GetDataTable(SqlStringBuilder.ToString());
return DataTypeConvert.NewObject.DataTableToArrayList(dt);
}
}
/// <summary>
/// 获取配置名称
/// </summary>
/// <returns></returns>
public DataTable GetModelName()
{
lock (_remotingProxy)
{
string SqlString = " select model_name as [value],model_name as [key] from sys_model where enabled = 'Y' ";
return _remotingProxy.GetDataTable(SqlString);
}
}
/// <summary>
/// 获取车型名称
/// </summary>
/// <returns></returns>
public DataTable GetTypeName()
{
lock (_remotingProxy)
{
string SqlString = " select type_name as [value],type_name as [key] from sys_model_type where enabled = 'Y' ";
return _remotingProxy.GetDataTable(SqlString);
}
}
}
}