Пример #1
0
        public ClassFeeView ConvertClassFee(ClassFee input)
        {
            ClassFeeView output = new ClassFeeView();

            output.Absence = input.Absence;
            output.ColorCode = input.ColorCode;
            output.Credit = input.Credit;
            output.CreditAdjustment = input.CreditAdjustment;

            output.FeeDeviations = new ArrayList();
            foreach (FeeDeviationPayableFee objFD in input.FeeDeviations.Values)
            {
                FeeDeviationPayableFeeView newFD =
                    ConvertFeeDeviationPayableFee(objFD, input.FeeBeforeDeviations);
                output.FeeDeviations.Add(newFD);
            }

            output.Forfeit = input.Forfeit;
            output.Id = input.Id;
            output.IdPaymentAdvice = input.IdPaymentAdvice;
            output.IsExcluded = (input.IsExcluded==1);
            output.Makeup = input.Makeup;
            output.NextMonthCredit = input.NextMonthCredit;
            output.PayableCredit = input.PayableCredit;
            output.PayableFee = input.PayableFee;
            output.PaymentAdviceText = input.PaymentAdviceText;
            output.PerLessonFee = input.PerLessonFee;
            output.Prorate = input.Prorate;
            output.Status = input.Status.Name;

            output.PrivateRemark = (input.PrivateRemark == null) ? "" : input.PrivateRemark;
            output.PublicRemark = (input.PublicRemark == null) ? "" : input.PublicRemark;

            output.RegularClass =
                ConvertRegular(input.GetAssociatedClass());

            return output;
        }