public async Task <IActionResult> CreateOrEdit(Guid id)
        {
            var subTitle = ":编辑数据";
            var isNew    = false;
            var bo       = await _boService.GetSingleAsyn(id);

            if (bo == null)
            {
                bo = new T()
                {
                    Name        = "",
                    Description = "",
                    SortCode    = ""
                };
                isNew    = true;
                subTitle = ":新建数据";
            }

            var boVM = new EntityViewModel();

            boVM.SetVM(bo);
            boVM.IsNew = isNew;

            ViewData["ModuleName"]   = EntityModuleName;
            ViewData["FunctionName"] = EntityTitle + subTitle;

            return(View("../../Views/CommonEntity/CreateOrEdit", boVM));
        }
        public async Task <IActionResult> Detail(Guid id)
        {
            var bo = await _boService.GetSingleAsyn(id);

            var boVM = new EntityViewModel();

            boVM.SetVM(bo);
            return(PartialView("../../Views/CommonEntity/Detail", boVM));
        }
        public async Task <IActionResult> List()
        {
            var boCollection = await _boService.GetAllAsyn();

            var boVMCollection = new List <EntityViewModel>();
            var counter        = 0;

            foreach (var item in boCollection.OrderBy(x => x.SortCode))
            {
                var boVM = new EntityViewModel();
                boVM.SetVM(item);
                boVM.OrderNumber = (++counter).ToString();
                boVMCollection.Add(boVM);
            }

            ViewBag.EntityTitle = EntityTitle;
            return(View("../../Views/CommonEntity/List", boVMCollection));
        }
        public async Task <IActionResult> Index()
        {
            var boCollection = await _boService.GetAllAsyn();

            var boVMCollection = new List <EntityViewModel>();
            var counter        = 0;

            foreach (var item in boCollection.OrderBy(x => x.SortCode))
            {
                var boVM = new EntityViewModel();
                boVM.SetVM(item);
                boVM.OrderNumber = (++counter).ToString();
                boVMCollection.Add(boVM);
            }

            ViewData["ModuleName"]   = EntityModuleName;
            ViewData["FunctionName"] = EntityTitle + "数据列表";

            return(View("../../Views/CommonEntity/Index", boVMCollection));
        }