Пример #1
0
        public ActionResult shippingMethod()
        {
            shippingMethod sm = new shippingMethod();

            ViewBag.Message = TempData["Message"];
            ViewBag.Status  = TempData["Status"];
            sm.MethodList   = db.payment_method_tbl.ToList();
            return(View(sm));
        }
Пример #2
0
        public ActionResult shippingMethod(shippingMethod sm)
        {
            if (ModelState.IsValid)
            {
                payment_method_tbl s = new payment_method_tbl();
                s.amount = sm.amount;
                s.status = sm.status;
                s.title  = sm.title;
                db.payment_method_tbl.Add(s);
                db.SaveChanges();

                message = "New Created Successfully";
                status  = true;
            }
            else
            {
                message = "Ther Have Some problems";
            }

            TempData["Message"] = message;
            TempData["Stauts"]  = status;
            return(RedirectToAction("shippingMethod"));
        }