private Registrant GenerateReg(CustomFieldCode regTypeDc, CustomFieldCode agendaDc, CustomFieldCode merchDc) { Registrant reg = new Registrant(evt); reg.Payment_Method = paymentMethod; reg.EventFee_Response = new EventFeeResponse(regType); reg.EventFee_Response.Code = regTypeDc; AgendaResponse_Checkbox resp1 = new AgendaResponse_Checkbox(); resp1.AgendaItem = agenda; resp1.Checked = true; resp1.Code = agendaDc; reg.CustomField_Responses.Add(resp1); MerchResponse_FixedPrice resp2 = new MerchResponse_FixedPrice(); resp2.Merchandise_Item = merch; resp2.Quantity = 1; resp2.Discount_Code = merchDc; reg.Merchandise_Responses.Add(resp2); return reg; }
private Registrant GenerateRegForTaxRate(FormData.Countries? country) { Registrant reg = new Registrant(evt); reg.EventFee_Response = new EventFeeResponse(regType); reg.EventFee_Response.Fee = regType.Price.Value; reg.Payment_Method = paymentMethod; if (country.HasValue) { reg.Country = country.Value; } AgendaResponse_Checkbox agResp = new AgendaResponse_Checkbox(); agResp.AgendaItem = agenda; agResp.Checked = true; agResp.Fee = agenda.Price.Value; MerchResponse_FixedPrice merchResp = new MerchResponse_FixedPrice(); merchResp.Merchandise_Item = merch; merchResp.Quantity = 2; merchResp.Fee = merch.Price.Value * merchResp.Quantity; reg.CustomField_Responses.Add(agResp); reg.Merchandise_Responses.Add(merchResp); KeywordProvider.RegistrationCreation.CreateRegistration(reg); return reg; }