Ejemplo n.º 1
0
        public string RegisterTeamLeader(string email, string name, Double amount, string registrationType)
        {
            var convictHelper = new convictsHelper();

            ConvictReturnObject convictResults = convictHelper.registerTeamConvict(email, name, registrationType);

            PaymentDTO paymentResults = paymentsHelper.AddPayment(email, email, amount, "", "team registration", false, DateTime.Now, 0, 0);

            /**
             *   Need to add error handling into this method.
             **/
            JavaScriptSerializer js = new JavaScriptSerializer();

            string strJSON = js.Serialize("{'teamcode':'" + convictResults.convict.TeamCode + "', 'convictcode': '" + convictResults.convict.ConvictCode + "', 'emailaddress': '" + convictResults.convict.Email + "'}");

            return(strJSON);
        }
        public string RegisterTeamLeader(string email, string name, Double amount, string registrationType)
        {
            var convictHelper = new convictsHelper();

            ConvictReturnObject convictResults = convictHelper.registerTeamConvict(email, name, registrationType);

            PaymentDTO paymentResults = paymentsHelper.AddPayment(email, email, amount, "", "team registration", false, DateTime.Now,0,0);
            /**
             *   Need to add error handling into this method.
             **/
            JavaScriptSerializer js = new JavaScriptSerializer();

            string strJSON = js.Serialize("{'teamcode':'" + convictResults.convict.TeamCode + "', 'convictcode': '" + convictResults.convict.ConvictCode + "', 'emailaddress': '" + convictResults.convict.Email + "'}");
            return strJSON;
        }