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

43 lines
1.4 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.FJC.Entity.Operation;
using QMFrameWork.Data;
using QMAPP.DAL;
namespace QMAPP.FJC.DAL.Operation
{
public class MaterialCodeDAL : BaseDAL
{
/// <summary>
/// 获取物料号
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public string GetMaterialCode(MaterialCode model)
{
string materialcode = null;
string sql = null;
sql = "SELECT MATERIAL_CODE FROM T_AW_MATERIALCODE WHERE PRODUCT_TYPES = @PRODUCT_TYPES";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
materialcode =
Convert.ToString(session.ExecuteSqlScalar(sql.ToString(),
new DataParameter("PRODUCT_TYPES", model.PRODUCT_TYPES)));
}
return materialcode;
}
public string GetMaterialType(string proCode)
{
string sql = "SELECT PRODUCT_TYPES FROM T_AW_MATERIALCODE WHERE MATERIAL_CODE = @MATERIAL_CODE";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
return Convert.ToString(session.ExecuteSqlScalar(sql.ToString(),
new DataParameter("MATERIAL_CODE", proCode)));
}
}
}
}