public static void getSchedule() { IPLSchedule user = new IPLSchedule(); sortPaging sr = new sortPaging(); sr.pageNumber = 1; sr.pageSize = 100; user.getSchedule(sr); user.getBidQuestion(1); }
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)); }