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; } } #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 SearchData(string dsconn) { try { return ICSOPDAL.SearchData(dsconn); } catch (Exception ex) { throw ex; } } public static DataTable SearchData(string EnumText, string dsconn) { try { return ICSOPDAL.SearchData(EnumText, dsconn); } catch (Exception ex) { throw ex; } } #endregion } }