Exemplo n.º 1
0
        public JsonResult GetTeamFullInfoByFilterByAdvisor(VmTeamFullInfo filterItem = null)
        {
            var blTeam = new BLTeam();

            var teamFullInfoList = blTeam.GetTeamFullInfoByFilterByAdvisor(CurrentUserId, filterItem).ToList();

            teamFullInfoList.First().LabResultUrl = "/Resources/Uploaded/Teams/97fda227f835461d8b39a4f3bf1fa9fc/20180816004448favicon.png?CT=application_vnd.oasis.opendocument.spreadsheet.png," +
                                                    "/Resources/Uploaded/Teams/6a1436ffcab9434aad8fed02f32f2411/20180810151905favicon.png?CT=application_pdf.png," +
                                                    "/Resources/Uploaded/Teams/97fda227f835461d8b39a4f3bf1fa9fc/20180816005047favicon.png?CT=application_pkcs7_mime.png";
            return(Json(teamFullInfoList, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public IEnumerable <ViewTeamFullInfo> Select(VmTeamFullInfo filterItem, int index, int count)
        {
            var teamFullInfoList = from teamFullInfo in Context.ViewTeamFullInfoes
                                   select teamFullInfo;

            if (filterItem.Name != null)
            {
                teamFullInfoList = teamFullInfoList.Where(t => t.Name.Contains(filterItem.Name));
            }

            if (filterItem.Leader != null)
            {
                teamFullInfoList = teamFullInfoList.Where(t => t.Leader.Contains(filterItem.Leader));
            }

            if (filterItem.Advisor != null)
            {
                teamFullInfoList = teamFullInfoList.Where(t => t.Advisor.Contains(filterItem.Advisor));
            }

            if (filterItem.Judges != null)
            {
                teamFullInfoList = teamFullInfoList.Where(t => t.Judges.Contains(filterItem.Judges));
            }

            if (filterItem.RegistrationStatus != null)
            {
                teamFullInfoList = teamFullInfoList.Where(t => t.RegistrationStatus == filterItem.RegistrationStatus);
            }
            if (filterItem.PayStatus != null)
            {
                teamFullInfoList = teamFullInfoList.Where(t => t.PayStatus == filterItem.PayStatus);
            }

            //teamFullInfoList = teamFullInfoList.Where(t => t.PayStatus == filterItem.PayStatus);

            return(teamFullInfoList.OrderBy(t => t.Name).Skip(index).Take(count).ToArray());
        }