示例#1
0
 /// <summary>
 /// 根据商品代码返回交易商品
 /// </summary>
 /// <param name="commodityCode">商品代码</param>
 /// <returns></returns>
 public Entity.CM_Commodity GetCommodityByCommodityCode(string commodityCode)
 {
     try
     {
         LogHelper.WriteDebug("Debug-8207根据商品代码返回交易商品方法名称:GetCommodityByCommodityCode(string commodityCode)参数是:" + commodityCode + "时间是:" + DateTime.Now);
         CM_CommodityBLL            cM_CommodityBLL  = new CM_CommodityBLL();
         List <Entity.CM_Commodity> cM_CommodityList =
             cM_CommodityBLL.GetListArray(string.Format("CommodityCode='{0}'", commodityCode));
         if (cM_CommodityList.Count > 0)
         {
             Entity.CM_Commodity cM_Commodity = cM_CommodityList[0];
             if (cM_Commodity != null)
             {
                 return(cM_Commodity);
             }
         }
         return(null);
     }
     catch (Exception ex)
     {
         string      errCode = "GL-8207";
         string      errMsg  = "根据商品代码返回交易商品实体失败";
         VTException vte     = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(vte.ToString(), vte.InnerException);
         return(null);
     }
 }
示例#2
0
 /// <summary>
 /// 更新交易商品
 /// </summary>
 /// <param name="model">交易商品实体</param>
 /// <returns></returns>
 public bool UpdateCMCommodity(ManagementCenter.Model.CM_Commodity model)
 {
     try
     {
         return(cM_CommodityDAL.Update(model));
     }
     catch (Exception ex)
     {
         string      errCode   = "GL-4302";
         string      errMsg    = "更新交易商品失败!";
         VTException exception = new VTException(errCode, errMsg, ex);
         LogHelper.WriteError(exception.ToString(), exception.InnerException);
         return(false);
     }
 }
示例#3
0
        /// <summary>
        /// 更新交易商品
        /// </summary>
        /// <param name="model">交易商品实体</param>
        /// <returns></returns>
        public static bool UpdateCMCommodity(ManagementCenter.Model.CM_Commodity model)
        {
            CM_CommodityBLL cM_CommodityBLL = new CM_CommodityBLL();

            return(cM_CommodityBLL.UpdateCMCommodity(model));
        }