Ejemplo n.º 1
0
 public ActionResult EditLang(long SiteID, WorkV3.Models.SiteLangMenuModel item)
 {
     ViewBag.SiteID = SiteID;
     if (!Utility.CheckIsLogin())
     {
         Response.Redirect(Url.Action("Login", "Home"));
     }
     if (item.ID == 0)
     {
         item.ID = WorkLib.GetItem.NewSN();
     }
     if (item.LinkType == LangLinkType.CnTw)
     {
         item.Translate = true;
     }
     else
     {
         item.Translate = false;
         if (item.SelectSiteID.HasValue)
         {
             SitesModels siteModel = WorkV3.Models.DataAccess.SitesDAO.GetInfo(item.SelectSiteID.Value);
             item.Url = string.Format("~/w/{0}", siteModel.SN);
         }
     }
     AppendViewBags();
     ViewBag.UploadUrl = WorkV3.Golbal.UpdFileInfo.GetVPathBySiteID(SiteID, "Header");
     WorkV3.Models.DataAccess.SiteLangMenuDAO.SetItem(item);
     ViewBag.Exit = true;
     return(View(item));
 }
Ejemplo n.º 2
0
 public ActionResult ChangeStatus(string ID, bool Status)
 {
     WorkV3.Models.SiteLangMenuModel item = WorkV3.Models.DataAccess.SiteLangMenuDAO.GetItem(long.Parse(ID));
     item.IsShow = Status;
     WorkV3.Models.DataAccess.SiteLangMenuDAO.SetItem(item);
     return(Json("success"));
 }
Ejemplo n.º 3
0
 public ActionResult EditLang(long SiteID, long?id)
 {
     AppendViewBags();
     ViewBag.SiteID    = SiteID;
     ViewBag.UploadUrl = WorkV3.Golbal.UpdFileInfo.GetVPathBySiteID(SiteID, "Header");
     WorkV3.Models.SiteLangMenuModel item = null;
     if (id != null)
     {
         item = WorkV3.Models.DataAccess.SiteLangMenuDAO.GetItem((long)id);
     }
     return(View(item));
 }