コード例 #1
0
        public JsonResult SaveWelcome(Slide slide, SlideLang slideLang)
        {
            if (_session.IsLogin && _session.IsStore && _session.IsAdmin)
                {
                    slide.SiteID = _session.SiteID;
                    slide.Type = "WELCOME";
                    slide.IsActive = true;
                    slideLang.LangID = _session.LangID;
                    slideLang.Name = "Welcome";

                    IWelcome _cls = new WelcomeBO();
                    var IsResult = _cls.SaveWelcome(slide, slideLang);
                    return Json(new { IsOk = IsResult }, JsonRequestBehavior.AllowGet);
                }
                else
                    RedirectToAction("index", "admin");
                return Json("[]", JsonRequestBehavior.AllowGet);
        }
コード例 #2
0
 public JsonResult SaveSlide(Slide slide, SlideLang slideLang)
 {
     if (_session.IsLogin && _session.IsStore && _session.IsAdmin)
         {
             slide.SiteID = _session.SiteID;
             slideLang.LangID = _session.LangID;
             ISlide _cls = new SlideBO();
             var IsResult = _cls.SaveSlide(slide, slideLang);
             return Json(new { IsOk = IsResult }, JsonRequestBehavior.AllowGet);
         }
         else
             RedirectToAction("index", "admin");
         return Json("[]", JsonRequestBehavior.AllowGet);
 }