using System; using System.Collections.Generic; using System.Linq; using System.Text; using ICSSoft.Frame.Data.Entity; using ICSSoft.Frame.Data.DAL; using System.Data; namespace ICSSoft.Frame.Data.BLL { public class ICSOPBLL { #region 新增和修改 public static void Add(FormICSOPUIModel tbInfo, string dsconn) { try { if (string.IsNullOrWhiteSpace(dsconn)) { throw new Exception("数据库连接字符串错误"); } List tbInfoList = new List() { tbInfo }; ICSOPDAL.Add(tbInfoList, dsconn); } catch (Exception ex) { throw ex; } } #endregion #region 工序代码是否存在 public static bool IsIncluding(string opCODE, string dsconn) { try { return ICSOPDAL.IsIncluding(opCODE, dsconn); } catch (Exception ex) { throw ex; } } #endregion #region 查询工序信息 public static FormICSOPUIModel SearchOPInfo(string opcode, string dsconn) { try { List returnlist = ICSOPDAL.SearchOPInfo(opcode, dsconn); return returnlist[0]; } catch (Exception ex) { throw ex; } } #endregion #region 删除 public static void deleteInfo(List codeList, string dsconn) { try { ICSOPDAL.deleteInfo(codeList, dsconn); } catch (Exception ex) { throw ex; } } #endregion #region 判断是否在工序和资源的关系中 public static bool Including2RES(List idList, string dsconn) { try { return ICSOPDAL.Including2RES(idList, dsconn); } catch (Exception ex) { throw ex; } } #endregion #region 判断是否在途程和工序的关系中 public static bool IncludingROUTE2OP(List idList, string dsconn) { try { return ICSOPDAL.IncludingROUTE2OP(idList, dsconn); } catch (Exception ex) { throw ex; } } public static List GetROUTE2OP(List idList,string wp, string dsconn) { return ICSOPDAL.GetROUTE2OP(idList,wp, dsconn); } public static DataTable GetITEMROUTE2OP(List idList, string wp, string dsconn) { return ICSOPDAL.GetITEMROUTE2OP(idList, wp, dsconn); } #endregion #region 新增和修改List public static void AddList(List tbInfoList, string dsconn) { try { if (string.IsNullOrWhiteSpace(dsconn)) { throw new Exception("数据库连接字符串错误"); } ICSOPDAL.Add(tbInfoList, dsconn); } catch (Exception ex) { throw ex; } } #endregion #region 获取成本中心 public static DataTable SearchDataByEnumKey(string dsconn, string EnumKey) { try { return ICSOPDAL.SearchDataByEnumKey(dsconn, EnumKey); } catch (Exception ex) { throw ex; } } public static DataTable SearchDataByEnumText(string dsconn, string EnumKey, string EnumText) { try { return ICSOPDAL.SearchDataByEnumText(dsconn, EnumKey, EnumText); } catch (Exception ex) { throw ex; } } public static DataTable SearchDataByEnumValue(string dsconn, string EnumKey, string EnumValue) { try { return ICSOPDAL.SearchDataByEnumValue(dsconn, EnumKey, EnumValue); } catch (Exception ex) { throw ex; } } #endregion } }