Пример #1
0
        /// <summary>
        /// 新增区域关联
        /// </summary>
        /// <param name="areaName">区域名称</param>
        /// <param name="provinceCode">省份代码</param>
        /// <param name="operatorAccount">操作员帐号</param>
        public static void InsertAreaRelation(string areaName, string provinceCode, string operatorAccount)
        {
            var  repository = Factory.CreateAreaRepository();
            Guid area       = AreaService.QueryAreaCode(areaName);

            repository.InsertAreaRelation(area, provinceCode);
            saveAddLog("区域关联", string.Format("区域Id:{0},省份代码:{1}", area, provinceCode), provinceCode.ToString(), operatorAccount);
        }
Пример #2
0
        /// <summary>
        /// 修改区域关联
        /// </summary>
        /// <param name="areaName">区域名称</param>
        /// <param name="provinceCode">省份代码</param>
        /// <param name="operatorAccount">操作员帐号</param>
        public static void UpdateAreaRelation(string areaName, string provinceCode, string operatorAccount)
        {
            var areaId     = AreaService.QueryAreaCode(areaName);
            var repository = Factory.CreateAreaRepository();

            repository.UpdateAreaRelation(areaId, provinceCode);
            // 记录日志
            var    oldView         = AreaService.QueryRelation(provinceCode);
            string originalContent = string.Format("省份名称:{0},区域名称:{1}", oldView.ProcinceName, oldView.AreaName);
            string newContent      = string.Format("省份名称:{0},区域名称:{1}", oldView.ProcinceName, areaName);

            saveUpdateLog("区域关联", originalContent, newContent, provinceCode, operatorAccount);
        }