public ActionResult CreateSection(int id = 0)
        {
            ViewBag.ClassMasterList = _classMasterRepository.GetEntityList();

            if (id == 0)
            {
                return(PartialView("~/Views/Shared/SectionMaster/_sectionMasterCreatePartial.cshtml"));
            }
            else
            {
                var result = _sectionMasterRepository.GetEntityById(id);
                TempData["Id"] = result.Id;
                return(PartialView("~/Views/Shared/SectionMaster/_sectionMasterCreatePartial.cshtml", result));
            }
        }
 // GET: StudentMaster/Create
 public ActionResult Create(int id = 0)
 {
     TempData["Id"]        = id;
     ViewBag.ClassMaster   = _classMasterRepository.GetEntityList();
     ViewBag.SectionMaster = _sectionMasterRepository.GetEntityList();
     ViewBag.GenderMaster  = _genderMasterRepository.GetEntityList();
     ViewBag.BloodGroup    = _bloodGroupMasterRepository.GetEntities();
     ViewBag.Caste         = _casteRepository.GetEntities();
     ViewBag.Religion      = _religionMasterRepository.GetEntityList();
     if (id == 0)
     {
         return(View());
     }
     else
     {
         var result = _studentMasterRepository.GetEntities().Where(item => item.Id == id).ToList();
         return(View(result.FirstOrDefault()));
     }
 }
Esempio n. 3
0
        public JsonResult GetAllocationType(int id)
        {
            switch (id)
            {
            case 1:
                return(Json(_classMasterRepository.GetEntityList(), JsonRequestBehavior.AllowGet));

            case 2:
                return(Json(_genderMasterRepository.GetEntityList(), JsonRequestBehavior.AllowGet));

            case 3:
                return(Json(_casteRepository.GetEntities(), JsonRequestBehavior.AllowGet));

            case 4:
                return(Json(_religionMasterRepository.GetEntityList(), JsonRequestBehavior.AllowGet));

            case 5:
                return(Json(_casteRepository.GetEntities(), JsonRequestBehavior.AllowGet));

            default:
                return(Json("No data available", JsonRequestBehavior.AllowGet));
            }
        }
        public ActionResult GetClassMasterList()
        {
            var result = _classMasterRepository.GetEntityList();

            return(PartialView("~/Views/Shared/ClassMaster/_ClassMasterListPartial.cshtml", result));
        }