示例#1
0
 private void UpdatePropPaySchedule(PropPaySchedule target, PaymentScheduleModel source)
 {
     target.PropertyId             = source.PropertyId;
     target.PropertyDocumentTypeId = source.PropertyDocumentTypeId;
     target.ScheduleDate           = source.ScheduleDate.UtcDateTime;
     target.Description            = source.Description;
     target.Amount1 = source.Amount1;
     target.Amount2 = source.Amount2;
 }
示例#2
0
        private PaymentScheduleModel CreatePaymentScheduleModel(PropPaySchedule source)
        {
            var model = new PaymentScheduleModel {
                PropertyDocumentTypeId = source.PropertyDocumentTypeId,
                ScheduleId             = source.PropPayScheduleId,
                ScheduleDate           = source.ScheduleDate,
                Description            = source.Description,
                Amount1 = source.Amount1.ToString("N"),
                Amount2 = source.Amount2.ToString("N")
            };

            return(model);
        }
示例#3
0
        public async Task <int> AddPropPaySchedule(int propDocTypeId, List <PaymentScheduleModel> schedules, decimal Sale1, decimal Sale2)
        {
            using (var dataService = DataServiceFactory.CreateDataService())
            {
                var paySchedule = new List <PropPaySchedule>();
                foreach (var model in schedules)
                {
                    var pay = new PropPaySchedule();
                    UpdatePropPaySchedule(pay, model);
                    paySchedule.Add(pay);
                }

                return(await dataService.AddPropPaySchedule(propDocTypeId, paySchedule, Sale1, Sale2));
            }
        }