public ActionResult Index(int?id, int view = 0) { ViewBag.Organizations = organizationService.GetAll().Where(x => x.IsActive).ToList(); ViewBag.Designations = designationService.GetAll().Where(x => x.IsActive).ToList(); ViewBag.Departments = departmentService.GetAll().Where(x => x.IsActive).ToList(); ViewBag.Genders = genderService.GetAll().Where(x => x.IsActive).ToList(); ViewBag.Divisions = divisionService.GetAll().Where(x => x.IsActive).ToList(); ViewBag.Districts = districtService.GetAll().Where(x => x.IsActive).ToList(); ViewBag.Thanas = thanaService.GetAll().Where(x => x.IsActive).ToList(); ViewBag.Countries = countryService.GetAll().Where(x => x.IsActive).ToList(); ViewBag.TeamList = teamService.GetAll().ToList(); var executives = officeExecutiveService.GetAll().Where(x => x.IsActive).ToList(); ViewBag.ExecutiveList = executives; var executive = new OfficeExecutive() { Id = 0 }; if (id.HasValue) { executive = executives.FirstOrDefault(x => x.Id == id); } ViewBag.Executive = executive; ViewBag.IsViewMode = view; return(View()); }
//GetThanaList public JsonResult GetddlThanaList(string DistrictId) { if (DistrictId == "") { DistrictId = "0"; } var ThanaList = thanaService.GetAll().Where(t => t.DistrictId == (Convert.ToInt32(DistrictId))); return(Json(ThanaList, JsonRequestBehavior.AllowGet)); }