Exemple #1
0
        /// <summary>
        /// 设置航期优惠规则
        /// </summary>
        /// <param name="operatorId">操作员编号</param>
        /// <param name="hangQiId">航期编号</param>
        /// <param name="fangShi">多个共享优惠时的共享方式</param>
        /// <param name="items">规则集合</param>
        /// <returns></returns>
        public int SheZhiHangQiYouHuiGuiZe(string operatorId, string hangQiId, EyouSoft.Model.EnumType.YlStructure.YouHuiGongXiangFangShi fangShi, IList <EyouSoft.Model.YlStructure.MHangQiYouHuiGuiZeInfo> items)
        {
            if (string.IsNullOrEmpty(operatorId) || string.IsNullOrEmpty(hangQiId))
            {
                return(0);
            }

            foreach (var item in items)
            {
                if (string.IsNullOrEmpty(item.GuiZeId))
                {
                    item.GuiZeId = Guid.NewGuid().ToString();
                }
            }

            int dalRetCode = dal.SheZhiHangQiYouHuiGuiZe(operatorId, hangQiId, fangShi, items);

            if (dalRetCode == 1)
            {
                SysStructure.BSysLogHandle.Insert("设置航期优惠规则,航期编号:" + hangQiId);
            }

            return(dalRetCode);
        }
Exemple #2
0
        /// <summary>
        /// 获取航期优惠规则信息集合
        /// </summary>
        /// <param name="hangQiId">航期编号</param>
        /// <param name="fangShi">多个共享优惠时的共享方式</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.YlStructure.MHangQiYouHuiGuiZeInfo> GetHangQiyouHuiGuiZes(string hangQiId, out EyouSoft.Model.EnumType.YlStructure.YouHuiGongXiangFangShi fangShi)
        {
            fangShi = EyouSoft.Model.EnumType.YlStructure.YouHuiGongXiangFangShi.时享有;

            if (string.IsNullOrEmpty(hangQiId))
            {
                return(null);
            }

            return(dal.GetHangQiyouHuiGuiZes(hangQiId, out fangShi));
        }