コード例 #1
0
        public ActionResult SaveInfo(string newAddress, string newZipCode, string newStreet, string newCity, string newCountry,
                                     string newDelivArea, string newContactNumber, string newContactPerson)
        {
            var user = Session["user"] as Account;
            MailingInformation  mail         = new MailingInformation();
            DeliveryRateManager delivManager = new DeliveryRateManager();
            MailingInfoModel    manager      = new MailingInfoModel();

            mail.addressline    = newAddress;
            mail.city           = newCity;
            mail.streetname     = newStreet;
            mail.zipcode        = newZipCode;
            mail.contactNumber  = newContactNumber;
            mail.contactPerson  = newContactPerson;
            mail.country        = newCountry;
            mail.userID         = user.userID;
            mail.locationID     = delivManager.getLocationID(newDelivArea);
            ViewBag.mailDetails = mail.addressline + " " + mail.city + " " + mail.streetname + " " + mail.zipcode + " " + mail.contactNumber + " " + mail.contactPerson + " " + mail.country + " ";

            manager.addMailingInfo(mail);
            AccountManager aman = new AccountManager();
            Account        acc  = aman.getAccount(user.email, user.password);

            Session["deliveryMethod"] = "shipping";
            Session["user"]           = acc;
            Session["mail"]           = mail;
            return(RedirectToAction("checkout", "Transaction")); // go to next step
            //return RedirectToAction("Index", "Home");
        }
コード例 #2
0
        public ActionResult exist(string existID)
        {
            var user = Session["user"] as Account;
            MailingInfoModel manager = new MailingInfoModel();

            MailingInformation mail = manager.getMail(Int32.Parse(existID)); // eto yung mail

            Session["deliveryMethod"] = "shipping";
            Session["mail"]           = mail;
            return(RedirectToAction("checkout", "Transaction")); // go to next step
            //return RedirectToAction("Index", "Home");
        }