using Warehouse.DAL.AppDal; using System; using System.Collections.Generic; using System.Linq; using System.Web; using Warehouse.Models.mesModel; namespace Warehouse.DAL.AppDal { public class ModuleInfoDal { #region 组件界面信息 public List ModuleInfo(string serial) { using (var context = new mesModel()) { ModuleInfoCheckDal ModuleInfoDal = new ModuleInfoCheckDal(); string sql = ModuleInfoDal.SeachModuleSql(serial); var res = context.DynamicListFromSql(sql, null); return res.ToList(); } } #endregion #region 组件详细信息 public List ModuleInfoTwo(string serial) { using (var context = new mesModel()) { ModuleInfoCheckDal ModuleInfoDal = new ModuleInfoCheckDal(); string sql = ModuleInfoDal.SeachModuleTwoSql(serial); var res = context.DynamicListFromSql(sql, null); return res.ToList(); } } #endregion #region hold组件 public List holds(string serial,dynamic info) { using (var context = new mesModel()) { ModuleInfoCheckDal ModuleInfoDal = new ModuleInfoCheckDal(); string sql = ModuleInfoDal.HoldsSql(serial); //生码表添加扣留状态 var res = context.DynamicListFromSql(sql, null); string sql2 = ModuleInfoDal.HoldsQcSql(info); //qc表添加扣留记录 var res2 = context.DynamicListFromSql(sql, null); return res2.ToList(); } } #endregion #region 查询大不良 public List searchBigBad() { using (var context = new mesModel()) { ModuleInfoCheckDal ModuleInfoDal = new ModuleInfoCheckDal(); string sql = ModuleInfoDal.searchBigBadSql(); var res = context.DynamicListFromSql(sql, null); return res.ToList(); } } #endregion #region 查询大不良 public List searchSmallBad(string BigBad) { using (var context = new mesModel()) { ModuleInfoCheckDal ModuleInfoDal = new ModuleInfoCheckDal(); string sql = ModuleInfoDal.searchSmallBadSql(BigBad); var res = context.DynamicListFromSql(sql, null); return res.ToList(); } } #endregion #region 添加不良 public List addBadnesss(dynamic defectInfo) { using (var context = new mesModel()) { ModuleInfoCheckDal ModuleInfoDal = new ModuleInfoCheckDal(); string sql = ModuleInfoDal.addBadnesssSql(defectInfo); var res = context.DynamicListFromSql(sql, null); return res.ToList(); } } #endregion } }