private void ShowDetails(IEnumerable <ScheduleDetail> details)
 {
     if (Details != null)
     {
         Details.CollectionChanged -= OnDetailsChanged;
         Details = new ObservableCollection <ScheduleDetailsController>();
         Details.CollectionChanged += OnDetailsChanged;
     }
     foreach (var scheduleDetail in details)
     {
         ScheduleDetailsController sdController = new ScheduleDetailsController()
         {
             Id             = scheduleDetail.Id,
             ScheduleId     = scheduleDetail.ScheduleId,
             AmountDue      = scheduleDetail.AmountDue,
             DateDue        = scheduleDetail.DateDue,
             AmountPaid     = scheduleDetail.AmountPaid,
             ContractNo     = scheduleDetail.ContractNo,
             DiscountAmount = scheduleDetail.DiscountAmount,
             State          = ControllerStates.Loaded,
             Remarks        = scheduleDetail.Remarks
         };
         Debug.Assert(Details != null, "Details != null");
         Details.Add(sdController);
     }
 }
 private ScheduleDetail CreateScheduleDetail(ScheduleDetailsController controlller)
 {
     return(new ScheduleDetail()
     {
         ScheduleId = ScheduleId,
         AmountDue = controlller.AmountDue,
         DateDue = controlller.DateDue,
         AmountPaid = controlller.AmountPaid,
         Balance = controlller.Balance,
         DiscountAmount = controlller.DiscountAmount,
         Remarks = controlller.Remarks,
         ContractNo = controlller.ContractNo
     });
 }
Exemple #3
0
 public void SetContractNo(ScheduleDetailsController detail)
 {
     detail.ContractNo = _contractNo;
 }