예제 #1
0
        public ActionResult Edit(int id)
        {
            //int itemId = Request[""]
            QA.Model.MenuInfo menuItem = menuInfoService.LoadEntities(m => m.ID == id).FirstOrDefault();

            return(View(menuItem));
        }
예제 #2
0
        public ActionResult Edit(QA.Model.MenuInfo menuInfo)
        {
            bool result = menuInfoService.EditEntity(menuInfo);

            if (result)
            {
                return(Content("ok"));
            }

            return(Content("failed to update a menu item"));
        }
예제 #3
0
        public ActionResult AddMenu(QA.Model.MenuInfo menuInfo)
        {
            menuInfo.SubBy        = this.LoginUserInfo.ID;
            menuInfo.SubTime      = DateTime.Now;
            menuInfo.DelFlag      = (short)QA.Model.Enum.DelFlagEnum.Normal;
            menuInfo.DialogHeight = 500;
            menuInfo.DialogWidth  = 500;
            menuInfo.IsVisable    = true;
            menuInfo.ParentId     = 1;

            menuInfoService.AddEntity(menuInfo);

            return(Content("ok"));
        }