示例#1
0
        public static void Insert(PolicyHarmony harmony, string operatorAccount)
        {
            var repository = Factory.CreatePolicyHarmonyRepository();

            repository.Insert(harmony);
            // 记录日志
            string content = string.Format("政策协调Id:{0},航空公司:{1},始发地:{2},目的地:{3},政策类型:{4},受限城市:{5},帐号类型:{6],返佣类型:{7},有效时间:{8}-{9},政策协调值:{10},备注:{11}",
                                           harmony.Id, harmony.Airlines.Join(","), harmony.Departure.Join(","), harmony.Arrival.Join(","), harmony.PolicyType, harmony.CityLimit.Join(","),
                                           harmony.IsVIP, harmony.DeductionType, harmony.EffectiveDateRange.Lower.Date, harmony.EffectiveDateRange.Upper.Date, harmony.HarmonyValue, harmony.Remark);

            saveAddLog("政策协调", content, harmony.Id.ToString(), operatorAccount);
        }
示例#2
0
        public static void Update(PolicyHarmony harmony, string operatorAccount)
        {
            var repository = Factory.CreatePolicyHarmonyRepository();

            repository.Update(harmony);
            // 记录日志
            var    oldHarmony      = PolicyHarmonyService.Query(harmony.Id);
            string orginialContent = string.Format("政策协调Id:{0},航空公司:{1},始发地:{2},目的地:{3},政策类型:{4},受限城市:{5},帐号类型:{6],返佣类型:{7},有效时间:{8}-{9},政策协调值:{10},备注:{11}",
                                                   oldHarmony.Id, oldHarmony.Airlines.Join(","), oldHarmony.Departure.Join(","), oldHarmony.Arrival.Join(","), oldHarmony.PolicyType, oldHarmony.CityLimit.Join(","),
                                                   oldHarmony.IsVIP, oldHarmony.DeductionType, oldHarmony.EffectiveDate.Lower.Date.ToString("yyyy-MM-dd"), oldHarmony.EffectiveDate.Upper.Date.ToString("yyyy-MM-dd"), oldHarmony.HarmonyValue, oldHarmony.Remark);
            string newContent = string.Format("政策协调Id:{0},航空公司:{1},始发地:{2},目的地:{3},政策类型:{4},受限城市:{5},帐号类型:{6],返佣类型{7},有效时间:{8}-{9},政策协调值:{9},备注:{10}",
                                              harmony.Id, harmony.Airlines.Join(","), harmony.Departure.Join(","), harmony.Arrival.Join(","), harmony.PolicyType, harmony.CityLimit.Join(","),
                                              harmony.IsVIP, harmony.DeductionType, harmony.EffectiveDateRange.Lower.Date.ToString("yyyy-MM-dd"), harmony.EffectiveDateRange.Upper.Date.ToString("yyyy-MM-dd"), harmony.HarmonyValue, harmony.Remark);

            saveUpdateLog("政策协调", orginialContent, newContent, harmony.Id.ToString(), operatorAccount);
        }