Пример #1
0
        public ActionResult TeamList()
        {
            var bsTeam = new BLTeam();

            return(View(new VmTeamCollection()
            {
                TeamList = bsTeam.GetAdvisorTeams(CurrentUserId)
            }));
        }
Пример #2
0
        public ActionResult LoadCreateTeamForm()
        {
            var blPerson = new BLPerson();
            var person   = blPerson.GetPersonByUserId(CurrentUserId);

            var bsTeam    = new BLTeam();
            var teamCount = bsTeam.GetAdvisorTeams(CurrentUserId).Count();

            return(View("../Advisor/CreateTeam", new VmTeam
            {
                University = person.University,
                TeamCount = teamCount,
                Name = person.University.Substring(0, 3) + "-" + teamCount
            }));
        }
Пример #3
0
        public PartialViewResult SearchTeam(
            bool draggable,
            string OnItemSelected,
            bool allowDownlaod,
            bool allowEdit,
            bool showSearchBox,
            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.GetAdvisorTeams(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 = showSearchBox,
                SearchText = teamName,
                TeamList = teamList,
                HtmlControlId = htmlControlId,
                ParentHtmlControlId = ParentHtmlControlId,
                OnItemSelected = OnItemSelected,
                OnItemDragged = onItemDragged
            }));
        }
Пример #4
0
        public ActionResult TeamList(int activeItemId = -1)
        {
            var bsTeam = new BLTeam();

            return(View("TeamList", new VmTeamCollection
            {
                HtmlControlId = "Advisor_TeamList",
                DataAction = "ats",
                DataController = "Advisor",
                AllowDownlaod = true,
                AllowEdit = true,
                AllowDelete = true,
                ActiveItemId = activeItemId,
                Draggable = false,
                ShowSearchBox = false,
                ParentHtmlControlId = "TeamList_ParentHtmlControlId",
                OnItemSelected = "",
                TeamList = bsTeam.GetAdvisorTeams(CurrentUserId)
            }));
        }