コード例 #1
0
        public ActionResult addonowner(int owid = 0)
        {
            OwnerAddOn ui = new OwnerAddOn();

            ui.OwnerId = owid;


            return(View(ui));
        }
コード例 #2
0
        public ActionResult addonowner(OwnerAddOn et)
        {
            if (ModelState.IsValid)
            {
                db.OwnerAddOns.Add(et);

                db.SaveChanges();

                ViewBag.message = "owner added sucessfully";
                return(RedirectToAction("Index"));
            }



            return(View());
        }