예제 #1
0
        /// <summary>
        /// 新增部门或用途
        /// </summary>
        /// <param name="model"></param>
        /// <param name="userName"></param>
        /// <returns></returns>
        public static bool InsertDepartmentUseSettingName(DepartmentAndUseModel model, string userName)
        {
            var result = DALPromotion.InsertDepartmentUseSetting(model);

            #region 新增日志
            if (result)
            {
                using (var log = new ConfigLogClient())
                {
                    log.InsertDefaultLogQueue("PromotionConfigLog", JsonConvert.SerializeObject(new
                    {
                        ObjectId    = model.SettingId,
                        ObjectType  = "CouponDepartmentAndUse",
                        BeforeValue = "",
                        AfterValue  = JsonConvert.SerializeObject(model),
                        Operate     = "新增",
                        Author      = userName
                    }));
                }
            }
            #endregion
            return(result);
        }