예제 #1
0
        public Register()
        {
            BrainTreePayment          = new BrainTreePayment();
            Attendee1AddressStateList = new List <SelectListItem>();
            Attendee2AddressStateList = new List <SelectListItem>();
            Attendee3AddressStateList = new List <SelectListItem>();
            Attendee4AddressStateList = new List <SelectListItem>();

            Attendee1TypeOptions = AttendeeTypeRadios.List();
            Attendee2TypeOptions = AttendeeTypeRadios.List();
            Attendee3TypeOptions = AttendeeTypeRadios.List();
            Attendee4TypeOptions = AttendeeTypeRadios.List();
        }
예제 #2
0
        public ActionResult Signup(string package = "")
        {
            if (package == "")
            {
                return(RedirectToAction("GetStarted", "Home"));
            }
            else
            {
                package = StringCipher.Base64Decode(package);

                BrainTreePayment payment = new BrainTreePayment();
                ViewBag.package = package;
                return(View());
            }
        }
예제 #3
0
        public ApplyToAdoptViewModel()
        {
            BrainTreePayment = new BrainTreePayment();

            States = new List <SelectListItem>();
            ResidenceOwnershipList          = new List <SelectListItem>();
            ResidencePetDepositCoverageList = new List <SelectListItem>();
            ResidenceTypeList = new List <SelectListItem>();
            StudentTypeList   = new List <SelectListItem>();

            ResidenceIsPetAllowedOptions           = YesNoRadios.List();
            ResidencePetSizeWeightLimitOptions     = YesNoRadios.List();
            ResidenceIsPetDepositRequiredOptions   = YesNoRadios.List();
            ResidenceIsPetDepositPaidOptions       = YesNoRadios.List();
            ResidenceIsYardFencedOptions           = YesNoRadios.List();
            IsAppOrSpouseStudentOptions            = YesNoRadios.List();
            IsAppTravelFrequentOptions             = YesNoRadios.List();
            FilterAppIsAwareHuskyAttributesOptions = YesNoRadios.List();
            FilterAppHasOwnedHuskyBeforeOptions    = YesNoRadios.List();
            FilterAppIsCatOwnerOptions             = YesNoRadios.List();

            IsAltered1Options         = YesNoRadios.List();
            IsHwPrevention1Options    = YesNoRadios.List();
            IsFullyVaccinated1Options = YesNoRadios.List();
            IsStillOwned1Options      = YesNoRadios.List();

            IsAltered2Options         = YesNoRadios.List();
            IsHwPrevention2Options    = YesNoRadios.List();
            IsFullyVaccinated2Options = YesNoRadios.List();
            IsStillOwned2Options      = YesNoRadios.List();

            IsAltered3Options         = YesNoRadios.List();
            IsHwPrevention3Options    = YesNoRadios.List();
            IsFullyVaccinated3Options = YesNoRadios.List();
            IsStillOwned3Options      = YesNoRadios.List();

            IsAltered4Options         = YesNoRadios.List();
            IsHwPrevention4Options    = YesNoRadios.List();
            IsFullyVaccinated4Options = YesNoRadios.List();
            IsStillOwned4Options      = YesNoRadios.List();

            IsAltered5Options         = YesNoRadios.List();
            IsHwPrevention5Options    = YesNoRadios.List();
            IsFullyVaccinated5Options = YesNoRadios.List();
            IsStillOwned5Options      = YesNoRadios.List();
        }
예제 #4
0
        public ActionResult PostRegister(FormCollection collection, string package, User u, string promoCode)
        {
            BrainTreePayment payments           = new BrainTreePayment();
            string           nonceFromTheClient = collection["payment_method_nonce"];
            int trial = 0;

            if (promoCode == "FYS3MONTH")
            {
                trial = 3;
            }
            else if (promoCode == "FYS2MONTH")
            {
                trial = 2;
            }
            else if (promoCode == "FYS1MONTH")
            {
                trial = 1;
            }
            if (package == "Silver_Buyer" || package == "Golden_Buyer")
            {
                string Subscription_Id = payments.proceedPayment(nonceFromTheClient, package, u, trial);
                if (Subscription_Id == "-1")
                {
                    return(RedirectToAction("SignupResult", "Auth", new { Message = "Requirements of customer for Braintree is not complete." }));
                }
                else if (Subscription_Id == "-2")
                {
                    return(RedirectToAction("SignupResult", "Auth", new { Message = "Problem in your card." }));
                }
                else if (Subscription_Id == "-3")
                {
                    return(RedirectToAction("SignupResult", "Auth", new { Message = "Problem in your funds." }));
                }
                else
                {
                    u.Role            = 0; // For Buyer
                    u.Subscription_Id = Subscription_Id;
                    new UserBL().AddUser(u);

                    string Subject = "New Buyer";
                    string Body    = "<strong>Name: </strong>" + u.Name + "<br><strong>Email: </strong> " + u.Email + "<br><strong>Phone: </strong> " + u.Phone + "<br><strong>Website Address:</strong>"
                                     + u.Website_Address + "<br><strong>Country: </strong> " + u.Country + "<br><strong>Role: </strong>Buyer";

                    MailToAdmin(u, Subject, Body);

                    return(RedirectToAction("BuyerSignUpVideo", "Auth", new { mail = u.Email, Message = "An email is sent to the Admin to make you an authorized user of this website. You will get an email from Admin within 24 hours." }));
                }
            }
            else if (package == "Silver_UK_Supplier" || package == "Golden_UK_Supplier")
            {
                string Subscription_Id = payments.proceedPayment(nonceFromTheClient, package, u, trial);

                if (Subscription_Id == "-1")
                {
                    return(RedirectToAction("SignupResult", "Auth", new { Message = "Requirements of customer for Braintree is not complete." }));
                }
                else if (Subscription_Id == "-2")
                {
                    return(RedirectToAction("SignupResult", "Auth", new { Message = "Problem in your card." }));
                }
                else if (Subscription_Id == "-3")
                {
                    return(RedirectToAction("SignupResult", "Auth", new { Message = "Problem in your funds." }));
                }
                else
                {
                    u.Role            = 1; // For UK Suppliers
                    u.Subscription_Id = Subscription_Id;
                    new UserBL().AddUser(u);

                    string Subject = "New UK Supplier";
                    string Body    = "<strong>Name: </strong>" + u.Name + "<br><strong>Email: </strong> " + u.Email + "<br><strong>Phone: </strong> " + u.Phone + "<br><strong>Website Address: </strong>"
                                     + u.Website_Address + "<br><strong>Country: </strong> " + u.Country + "<br><strong>Role: </strong>Buyer<br><strong>Company Name: </strong>" + u.Company_Name
                                     + "<br><strong>Company Number: </strong>" + u.Company_Number + "<br><strong>Company Address: </strong> " + u.Company_Address + "<br><strong>VAT Registration Number: </strong> " + u.VAT_Registration_Number;

                    MailToAdmin(u, Subject, Body);

                    return(RedirectToAction("SupplierSignUpVideo", "Auth", new { Message = "An email is sent to the Admin to make you an authorized user of this website. You will get an email from Admin within 24 hours." }));
                }
            }
            else if (package == "Silver_International_Supplier" || package == "Golden_International_Supplier")
            {
                string Subscription_Id = payments.proceedPayment(nonceFromTheClient, package, u, trial);

                if (Subscription_Id == "-1")
                {
                    return(RedirectToAction("SignupResult", "Auth", new { Message = "Requirements of customer for Braintree is not complete." }));
                }
                else if (Subscription_Id == "-2")
                {
                    return(RedirectToAction("SignupResult", "Auth", new { Message = "Problem in your card." }));
                }
                else if (Subscription_Id == "-3")
                {
                    return(RedirectToAction("SignupResult", "Auth", new { Message = "Problem in your funds." }));
                }
                else
                {
                    u.Role            = 2; // For International Suppliers
                    u.Subscription_Id = Subscription_Id;
                    new UserBL().AddUser(u);

                    string Subject = "New International Supplier";
                    string Body    = "<strong>Name: </strong>" + u.Name + "<br><strong>Email: </strong> " + u.Email + "<br><strong>Phone: </strong> " + u.Phone + "<br><strong>Website Address: </strong>"
                                     + u.Website_Address + "<br><strong>Country: </strong> " + u.Country + "<br><strong>Role: </strong>Buyer<br><strong>Company Name: </strong>" + u.Company_Name
                                     + "<br><strong>Company Number: </strong>" + u.Company_Number + "<br><strong>Company Address: </strong> " + u.Company_Address + "<br><strong>VAT Registration Number: </strong> " + u.VAT_Registration_Number;

                    MailToAdmin(u, Subject, Body);

                    return(RedirectToAction("SupplierSignUpVideo", "Auth", new { Message = "An email is sent to the Admin to make you an authorized user of this website. You will get an email from Admin within 24 hours." }));
                }
            }
            else
            {
                return(RedirectToAction("Index", "Home"));
            }
        }
예제 #5
0
 public DonationViewModel()
 {
     AmountDonation   = 25;
     BrainTreePayment = new BrainTreePayment();
 }