Exemple #1
0
        public void MenuAdd(MenusModels MData)
        {
            long NewID = GetItem.NewSN();

            MData.ID = NewID;
            MenusDAO.Insert_Single(MData);

            List <CardsTypeModels> CardsType = CardsTypeDAO.GetData();
            CardsTypeModels        CT        = CardsType.FindLast(dr => dr.Code == MData.DataType);

            if (CT.isNeedSN == true)
            {
                //新增
                // PubFunc.AddPage(MData.SiteID, MData.ID, MData.SN, MData.DataType, CT.EditURLAction, false, MData.Title, 1, true);
                PubFunc.AddPage(MData.SiteID, MData.ID, MData.SN, MData.DataType, null, false, MData.Title, 1, true);
            }
            SysLog.SaveLog(SysActions.Add, SysMgrNo.Menu, MData.Title, MData.SiteID, MData.ID, null);
            if (CT != null)
            {
                Response.Redirect(Url.Action(CT.URLAction, "Menus", new { id = NewID, SiteID = MData.SiteID }));
            }
            else
            {
                TempData["refreshData"] = 1;
                Response.Redirect(Request.RawUrl);
            }
        }