private PaymentViewModel PaymentBuilder(Fee fee, short membershipType, RegistrationFormViewModel r) { PaymentViewModel model = new PaymentViewModel(); model.FeeBreakUp = fee.Adapt <FeeViewModels>(); int GST = Convert.ToInt32(fee.GSTRate); model.MembershipFee = MembershipFee(fee, membershipType); model.GST = fee.GSTRate; model.TaxAmount = (model.MembershipFee * GST / 100); model.TotalAmount = model.MembershipFee + model.TaxAmount; model.MembershipFeeId = fee.Id; model.Modes = r.Modes; return(model); }