注塑喷涂
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.

56 lines
1.5 KiB

4 months ago
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using MESClassLibrary.Model;
using MESClassLibrary.BLL.Log;
namespace MESClassLibrary.DAL.BasicInfo
{
public class ColorDAL
{
public DataTable SearchInfoAll()
{
try
{
string sql = @"select * from [tb_Color] WHERE OrderNo IS NOT NULL AND OrderNo <>0 ORDER BY OrderNo";
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
public DataTable SearchByName(string color)
{
try
{
string sql = @"select distinct [ColorNo] from [tb_Color] where [Des]= @Des";
SqlParameter[] param=new SqlParameter[1];
param[0] = new SqlParameter("@Des", SqlDbType.VarChar);
param[0].Value = color;
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, param).Tables[0];
}
catch (Exception ex)
{
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
return null;
}
}
}
}