示例#1
0
        public IActionResult create(int?ParentId, RowSSOT rowType = RowSSOT.First)
        {
            if (rowType == RowSSOT.First)
            {
                return(View(viewName: "~/Views/Menu/createParent.cshtml"));
            }
            else if (rowType == RowSSOT.Title)
            {
                ViewBag.ParentId = ParentId;
                ViewBag.rowType  = rowType;

                return(View(viewName: "~/Views/Menu/createTitle.cshtml"));
            }
            else
            {
                ViewBag.ParentId = ParentId;
                ViewBag.rowType  = rowType;

                return(View(viewName: "~/Views/Menu/createChild.cshtml"));
            }
        }
示例#2
0
        public async Task <IActionResult> Edit(int id, RowSSOT Row)
        {
            if (Row == RowSSOT.First)
            {
                var model = await _MenuRepository.GetByCondition <MenuEntityParentDTO>(p => p.Id == id);

                return(View(viewName: "~/Views/Menu/EditParent.cshtml", model));
            }
            else if (Row == RowSSOT.Title)
            {
                var model = await _MenuRepository.GetByCondition <MenuEntityTitleDTO>(p => p.Id == id);

                return(View(viewName: "~/Views/Menu/EditTitle.cshtml", model));
            }
            else
            {
                var model = await _MenuRepository.GetByCondition <MenuEntityChildDTO>(p => p.Id == id);

                return(View(viewName: "~/Views/Menu/EditChild.cshtml", model));
            }
        }