using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.BLL;
using QMAPP.FJC.Entity.Operation;
using QMAPP.Entity;
using QMAPP.FJC.DAL.Operation;
using QMFrameWork.Data;
namespace QMAPP.FJC.BLL.Operation
{
public class MaterialCodeBLL:BaseBLL
{
///
/// 获取物料号信息
///
/// 属性
///
public DataResult GetMaterialCode(string protype)
{
DataResult materialcode = new DataResult();
MaterialCodeDAL MaterialCodeDal = new MaterialCodeDAL();
using (IDataSession session = AppDataFactory.CreateMainSession())
{
try
{
session.OpenTs();
MaterialCodeDal.BaseSession = session;
materialcode.Result = MaterialCodeDal.GetMaterialCode(new MaterialCode {PRODUCT_TYPES = protype});
session.CommitTs();
}
catch (Exception e)
{
session.RollbackTs();
throw e;
}
}
return materialcode;
}
public string GetMaterialType(string proCode)
{
try
{
return new MaterialCodeDAL().GetMaterialType(proCode);
}
catch (Exception ex)
{
throw;
}
}
}
}