コード例 #1
0
 public static PaymentAppointment ConvertToAppointPayment(PaymentAppointment appointment,
     PaymentScheduleLineDTO schedule)
 {
     appointment.Subject = schedule.Subject;
     appointment.Body = schedule.Body;
     appointment.End = schedule.End;
     appointment.Start = schedule.Start;
     appointment.Amount = schedule.Amount;
     appointment.IsAllDayEvent = schedule.IsAllDayEvent;
     appointment.UniqueId = schedule.PaymentScheduleLineId.ToString(CultureInfo.InvariantCulture);
     appointment.TimeMarker = GetTimeMarker(schedule.Importance);
     appointment.Category = GetCategory(schedule.ProcessStatus);
     return appointment;
 }
コード例 #2
0
 /// <summary>
 ///     实现Appointment转化Appointment
 /// </summary>
 /// <param name="schedule"></param>
 /// <returns></returns>
 public static PaymentAppointment ConvertToAppointPayment(PaymentScheduleLineDTO schedule)
 {
     var appointment = new PaymentAppointment
     {
         Subject = schedule.Subject,
         Body = schedule.Body,
         End = schedule.End,
         Start = schedule.Start,
         Amount = schedule.Amount,
         IsAllDayEvent = schedule.IsAllDayEvent,
         UniqueId = schedule.PaymentScheduleLineId.ToString(CultureInfo.InvariantCulture),
         TimeMarker = GetTimeMarker(schedule.Importance),
         Category = GetCategory(schedule.ProcessStatus)
     };
     return appointment;
 }
コード例 #3
0
 /// <summary>
 ///     PaymentAppointment信息复制到PaymentScheduleLineDTO
 /// </summary>
 /// <param name="appointment"></param>
 /// <param name="schedule"></param>
 /// <returns></returns>
 public static PaymentScheduleLineDTO ConvertToPaymentScheduleLine(PaymentAppointment appointment,
     PaymentScheduleLineDTO schedule)
 {
     if (appointment == null)
         throw new Exception("日程不能为空");
     if (schedule == null)
         throw new Exception("付款计划行不能为空");
     schedule.Subject = appointment.Subject;
     schedule.Body = appointment.Body;
     schedule.End = appointment.End;
     schedule.Start = appointment.Start;
     schedule.ScheduleDate = appointment.Start;
     schedule.Amount = appointment.Amount;
     schedule.IsAllDayEvent = schedule.IsAllDayEvent;
     if (appointment.TimeMarker != null)
         schedule.Importance = appointment.TimeMarker.TimeMarkerName;
     if (appointment.Category != null)
         schedule.ProcessStatus = appointment.Category.CategoryName;
     return schedule;
 }
コード例 #4
0
 /// <summary>
 ///     把Appointment转化PaymentScheduleLineDTO
 /// </summary>
 /// <param name="appointment"></param>
 /// <returns></returns>
 public static PaymentScheduleLineDTO ConvertToPaymentScheduleLine(PaymentAppointment appointment)
 {
     var schedule = new PaymentScheduleLineDTO
     {
         Body = appointment.Body,
         Subject = appointment.Subject,
         ScheduleDate = appointment.Start,
         Start = appointment.Start,
         End = appointment.End,
         IsAllDayEvent = appointment.IsAllDayEvent,
         Amount = appointment.Amount,
         PaymentScheduleLineId = int.Parse(appointment.UniqueId)
     };
     if (appointment.TimeMarker != null)
         schedule.Importance = appointment.TimeMarker.TimeMarkerName;
     if (appointment.Category != null)
         schedule.ProcessStatus = appointment.Category.CategoryName;
     return schedule;
 }