コード例 #1
0
ファイル: Program.cs プロジェクト: shreedhar-ww/IPLFinalCode
        public static void getSchedule()
        {
            IPLSchedule user = new IPLSchedule();
            sortPaging  sr   = new sortPaging();

            sr.pageNumber = 1;
            sr.pageSize   = 100;
            user.getSchedule(sr);

            user.getBidQuestion(1);
        }
コード例 #2
0
        public ActionResult GetSchedule()
        {
            List <Schedule> matches = new List <Schedule>();

            matches = iplSchedule.getSchedule(new sortPaging {
                pageNumber = 1, pageSize = 1000, sortColumn = "", sortDirection = ""
            });
            var vList = new
            {
                aaData = (from item in matches
                          select new
                {
                    Day = string.Format("{0:g}", Convert.ToDateTime(item.matchDate)),
                    TeamA = item.TeamA,
                    TeamB = item.TeamB,
                    SetQuestions = "<a class='btn btn-info btn-sm' href='#' onclick='fn_setMatchDetails(" + item.Id.ToString() + ",\"" + item.TeamA.ToString() + "\"" + ",\"" + item.TeamB.ToString() + "\")'>Set Questions</a>",
                    SetAnswers = "<a class='btn btn-info btn-sm' href='#' onclick='fn_setMatchDetailsForAnswers(" + item.Id.ToString() + ",\"" + item.TeamA.ToString() + "\"" + ",\"" + item.TeamB.ToString() + "\")'>Set Answers</a>",
                }).ToArray(),
            };

            return(Json(vList, JsonRequestBehavior.AllowGet));
        }