Beispiel #1
0
        public ActionResult GetInducteesByBatchID(int?BatchID)
        {
            if (BatchID == null)
            {
                return(HttpNotFound());
            }
            var Ind = InducteeRepo.InducteesByBatch(BatchID);

            return(PartialView("InducteeByBatch", Ind));
        }
Beispiel #2
0
        public JsonResult GetIndcutees(int batchId)
        {
            var inductees = new List <InducteeModel>()
            {
                new InducteeModel()
                {
                    Id = -1, Name = "All"
                }
            };

            if (batchId > 0)
            {
                inductees.AddRange(IndcuteeRepo.InducteesByBatch(batchId));
            }
            return(Json(inductees.Select(n => new { Id = n.Id, Name = n.Name }).ToList(), JsonRequestBehavior.AllowGet));
        }