public static void Delete(Guid id, string operatorAccount) { var repository = Factory.CreatePolicyHarmonyRepository(); repository.Delete(id); // 记录日志 var view = PolicyHarmonyService.Query(id); string content = string.Format("政策协调Id:{0},航空公司:{1},始发地:{2},目的地:{3},政策类型:{4},受限城市:{5},帐号类型:{6],返佣类型:{7},有效时间:{8}-{9},政策协调值:{10},备注:{11}", view.Id, view.Airlines.Join(","), view.Departure.Join(","), view.Arrival.Join(","), view.PolicyType, view.CityLimit.Join(","), view.IsVIP, view.DeductionType, view.EffectiveDate.Lower.Date.ToString("yyyy-MM-dd"), view.EffectiveDate.Upper.Date.ToString("yyyy-MM-dd"), view.HarmonyValue, view.Remark); saveDeleteLog("政策协调", content, id.ToString(), operatorAccount); }
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); }