public static bool UpdateProviderProduct(ProviderProductModel model)
        {
            UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"];

            if (model.ID <= 0)
            {
                return(false);
            }
            try
            {
                bool         succ     = false;
                LogInfoModel logModel = InitLogInfo("推荐物品ID:" + Convert.ToString(model.ID));
                logModel.Element = ConstUtil.LOG_PROCESS_UPDATE;
                //设置模块ID 模块ID请在ConstUtil中定义,以便维护
                logModel.ModuleID = ConstUtil.MODULE_ID_PROVIDERPRODUCT_ADD;
                succ = ProviderProductDBHelper.UpdateProviderProduct(model);
                if (!succ)
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                else
                {
                    logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
                }
                LogDBHelper.InsertLog(logModel);
                return(succ);
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }
 public static bool InsertProviderProduct(ProviderProductModel model, out string ID)
 {
     try
     {
         bool succ = false;
         succ = ProviderProductDBHelper.InsertProviderProduct(model, out ID);
         string       ProviderProductID = ID;
         LogInfoModel logModel          = InitLogInfo("推荐物品ID:" + ProviderProductID);
         logModel.Element = ConstUtil.LOG_PROCESS_INSERT;
         //设置模块ID 模块ID请在ConstUtil中定义,以便维护
         logModel.ModuleID = ConstUtil.MODULE_ID_PROVIDERPRODUCT_ADD;
         if (!succ)
         {
             logModel.Remark = ConstUtil.LOG_PROCESS_FAILED;
         }
         else
         {
             logModel.Remark = ConstUtil.LOG_PROCESS_SUCCESS;
         }
         LogDBHelper.InsertLog(logModel);
         return(succ);
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
 public static DataTable ISCunzaiProviderProduct(int ProductID, string CompanyCD)
 {
     try
     {
         return(ProviderProductDBHelper.ISCunzaiProviderProduct(ProductID, CompanyCD));
     }
     catch
     {
         return(null);
     }
 }
 public static DataTable SelectProviderProduct(int ID)
 {
     try
     {
         return(ProviderProductDBHelper.SelectProviderProduct(ID));
     }
     catch
     {
         return(null);
     }
 }
 public static DataTable SelectProviderProduct(int pageIndex, int pageCount, string orderBy, ref int TotalCount, string CustNo, string ProductID, string Grade, string Joiner, string StartJoinDate, string EndJoinDate)
 {
     try
     {
         return(ProviderProductDBHelper.SelectProviderProductList(pageIndex, pageCount, orderBy, ref TotalCount, CustNo, ProductID, Grade, Joiner, StartJoinDate, EndJoinDate));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public static bool DeleteProviderProduct(string ID, string CompanyCD)
        {
            if (string.IsNullOrEmpty(ID))
            {
                return(false);
            }
            try
            {
                bool   isSucc = ProviderProductDBHelper.DeleteProviderProduct(ID, CompanyCD);
                string remark;
                //成功时
                if (isSucc)
                {
                    //设置操作成功标识
                    remark = ConstUtil.LOG_PROCESS_SUCCESS;
                }
                else
                {
                    //设置操作成功标识
                    remark = ConstUtil.LOG_PROCESS_FAILED;
                }
                //获取删除的编号列表
                string[] noList = ID.Split(',');
                //遍历所有编号,登陆操作日志
                for (int i = 0; i < noList.Length; i++)
                {
                    //获取编号
                    string no = noList[i];
                    //替换两边的 '
                    no = no.Replace("'", string.Empty);

                    //操作日志
                    LogInfoModel logModel = InitLogInfo("推荐物品ID:" + no);
                    //涉及关键元素 这个需要根据每个页面具体设置,本页面暂时设置为空
                    logModel.Element = ConstUtil.LOG_PROCESS_DELETE;
                    //设置模块ID 模块ID请在ConstUtil中定义,以便维护
                    logModel.ModuleID = ConstUtil.MODULE_ID_PROVIDERPRODUCTINFO;
                    //设置操作成功标识
                    logModel.Remark = remark;

                    //登陆日志
                    LogDBHelper.InsertLog(logModel);
                }
                return(isSucc);
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }