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.
54 lines
1.5 KiB
54 lines
1.5 KiB
3 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using System.Data;
|
||
|
using System.Reflection;
|
||
|
using MESClassLibrary.BLL.Log;
|
||
|
using MESClassLibrary.EFModel;
|
||
|
|
||
|
namespace MESClassLibrary.DAL.BasicInfo
|
||
|
{
|
||
|
public class PaintColorDAL
|
||
|
{
|
||
|
public DataTable SearchColorByStock(string stockNo)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
string sql = @"select * from tb_PaintColorInfo where StockNo='" + stockNo + "'";
|
||
|
|
||
|
return SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null).Tables[0];
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
LogErrBLL.AddInfo(ex.ToString(),MethodBase.GetCurrentMethod());
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public string paintColor(string stockNo, string color)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
string res = "";
|
||
|
|
||
|
string sql = @"select Paint_No from tb_PaintColorInfo where stock='" + stockNo + @"' and Color='" + color + @"'";
|
||
|
|
||
|
DataTable dt = SqlHelper.ExecuteDataset(SqlHelper.GetConnSting(), CommandType.Text, sql, null)
|
||
|
.Tables[0];
|
||
|
if (dt != null && dt.Rows.Count > 0)
|
||
|
{
|
||
|
res = dt.Rows[0]["Paint_No"].ToString();
|
||
|
}
|
||
|
|
||
|
return res;
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
|
||
|
return "";
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|