示例#1
0
        public ActionResult TeamList(int activeItemId = -1)
        {
            var bsTeam = new BLTeam();

            return(View("TeamList", new VmTeamCollection
            {
                HtmlControlId = "Judge_TeamList",
                DataAction = "jts",
                DataController = "Judge",
                AllowDownlaod = false,
                AllowEdit = false,
                AllowDelete = false,
                ActiveItemId = activeItemId,
                Draggable = false,
                ShowSearchBox = true,
                ParentHtmlControlId = "TeamList_ParentHtmlControlId",
                OnItemSelected = "",
                TeamList = bsTeam.GetJudgeTeams(CurrentUserId)
            }));
        }
示例#2
0
        public PartialViewResult SearchTeam(
            bool draggable,
            string OnItemSelected,
            bool allowDownlaod,
            bool allowEdit,
            bool allowReject,
            string onItemRejecting,
            bool allowAccept,
            string onItemAccepting,
            bool allowDelete,
            string htmlControlId,
            string dataAction,
            string dataController,
            string ParentHtmlControlId, string onItemDragged,
            string teamName = "")
        {
            var bsTeam   = new BLTeam();
            var teamList = bsTeam.GetJudgeTeams(CurrentUserId, teamName);

            return(PartialView("_TeamList",
                               new VmTeamCollection
            {
                DataAction = dataAction,
                DataController = dataController,
                AllowDownlaod = allowDownlaod,
                AllowEdit = allowEdit,
                AllowReject = allowReject,
                OnItemRejecting = onItemRejecting,
                AllowAccept = allowAccept,
                OnItemAccepting = onItemAccepting,
                AllowDelete = allowDelete,
                Draggable = draggable,
                ShowSearchBox = true,
                SearchText = teamName,
                TeamList = teamList,
                HtmlControlId = htmlControlId,
                ParentHtmlControlId = ParentHtmlControlId,
                OnItemSelected = OnItemSelected,
                OnItemDragged = onItemDragged
            }));
        }