コード例 #1
0
 public ActionResult About()
 {
     AboutUs aboutUs = new AboutUs();
     //AboutUsInfo returnValue = aboutUs.Get(new AboutUsInfo());
     AboutUsInfo returnValue = new AboutUsInfo();
     return View(returnValue);
 }
コード例 #2
0
        public ActionResult About(AboutUsInfo model)
        {
            AboutUs aboutUs = new AboutUs();
            bool returnVal = true;
            if (ModelState.IsValid)
            {
                if (model.AboutUsId > 0)
                {
                    returnVal = aboutUs.Set(model);
                }
                else
                {
                    returnVal = aboutUs.Insert(model);
                }
            }

            return this.Json(returnVal, JsonRequestBehavior.AllowGet);
        }