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.
32 lines
1.3 KiB
32 lines
1.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data;
|
|
using ICSSoft.Base.Config.AppConfig;
|
|
using ICSSoft.Base.Config.DBHelper;
|
|
using System.Data.SqlClient;
|
|
|
|
namespace ICSSoft.Frame.Data.DAL
|
|
{
|
|
public class ICSSys_EnumValuesDAL
|
|
{
|
|
public static DataTable GetNcrResultItems(bool returnGoods, string WorkPointCode)
|
|
{
|
|
string sql = @"select EnumText as [结果判定] from Sys_EnumValues WHERE EnumKey='00103' AND WorkPointCode='{0}' {1}";
|
|
sql = string.Format(sql, WorkPointCode, returnGoods ? "" : " AND EnumText NOT LIKE '%退货%'");
|
|
return DBHelper.ExecuteDataset(AppConfig.AppConnectString, CommandType.Text, sql).Tables[0];
|
|
}
|
|
|
|
public static string GetNcrNGSource(string conn, string WorkPointCode)
|
|
{
|
|
string sql = "SELECT top 1 EnumText FROM dbo.Sys_EnumValues WHERE EnumKey='00101' AND WorkPointCode='" + AppConfig.WorkPointCode + "'";
|
|
DataTable dt = DBHelper.ExecuteDataset(conn, CommandType.Text, sql).Tables[0];
|
|
if (dt.Rows.Count == 0)
|
|
{
|
|
throw new Exception("自定义档案未维护:ncr不良起源,对应代码00101");
|
|
}
|
|
return dt.Rows[0][0].ToString();
|
|
}
|
|
}
|
|
}
|