public ActionResult Edit(string id) { var userDetailView = new UserDetailView(); var request = _userDetailService.GetById(id); Mapper.Map(request, userDetailView); var userRole = GetUserRoleByUserDetailId(request.Id); ViewBag.GenderId = new SelectList(_genderService.GetAll(), "Id", "Name", request.GenderId); ViewBag.UserRole = new SelectList(_context.Roles, "Name", "Name", userRole); return(View(userDetailView)); }
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()); }
private void DropList() { var genderGrp = _genderService.GetAll().Data.ToList(); var bloodGrp = _bloodGroupService.GetAll().Data.ToList(); var maritalGrp = _maritalStatusService.GetAll().Data.ToList(); var disabilityGrp = _privateStatusService.GetAll().Data.ToList(); var serviceGrp = _serviceInfoService.GetAll().Data.ToList(); var currentGrp = _currentStatusService.GetAll().Data.ToList(); var workingStatusGrp = _workingStatusService.GetAll().Data.ToList(); var shiftInfoGrp = _shiftInfoService.GetAll().Data.ToList(); var workPlaceGrp = _workplaceService.GetAll().Data.ToList(); var adminStatusGrp = _adminStatusService.GetAll().Data.ToList(); var provinceGrp = _provinceService.GetAll().Data.ToList(); var tisJobGrp = _tisJobCodeService.GetAll().Data.ToList(); ViewBag.AdminStatusGrpList = new SelectList(adminStatusGrp, "IdarecilikDurumId", "IdarecilikDurumu"); ViewBag.WorkPlaceGrpList = new SelectList(workPlaceGrp, "IsYeriId", "IsYeriAdi"); ViewBag.GenderGrpList = new SelectList(genderGrp, "CinsiyetId", "Cinsiyeti"); ViewBag.BloodGrpList = new SelectList(bloodGrp, "KanGrupId", "KanGrubu"); ViewBag.MaritalStatusGrpList = new SelectList(maritalGrp, "MedeniHalId", "MedeniHali"); ViewBag.DisabilityStatusGrpList = new SelectList(disabilityGrp, "OzelDurumId", "OzelDurumu"); ViewBag.ServiceStatusGrpList = new SelectList(serviceGrp, "ServisBilgiId", "ServisBilgisi"); ViewBag.CurrentStatusGrpList = new SelectList(currentGrp, "MevcutStatuId", "MevcutStatu"); ViewBag.WorkingStatusGrpList = new SelectList(workingStatusGrp, "IstihtamDurumId", "IstihtamDurumu"); ViewBag.ShiftInfoGrpList = new SelectList(shiftInfoGrp, "VardiyaBilgiId", "VardiyaBilgisi"); ViewBag.ProvinceGrpList = new SelectList(provinceGrp, "IlId", "IlAdi"); ViewBag.TisJobGrpList = new SelectList(tisJobGrp, "TisMeslekKodId", "TisMeslekAdi"); }
public IEnumerable <GenderIndexViewModel> GetGender() { List <Gender> items = _genderService.GetAll().ToList(); var models = Mapper.Map <IList <Gender>, IList <GenderIndexViewModel> >(items); return(models); }
public IQueryable <GenderModel> GetAll() { //Configuration.Services.GetTraceWriter().Info(Request, "GenderController", "Get the list."); var list = _service.GetAll(); var queryable = list.AsQueryable(); return(queryable); }
public ActionResult Read() { //StsContext db = new StsContext(); ////جهت غیر فعال کردن لود فرزندان و در نتیجه جلوگیری از ایجاد حلقه //db.Configuration.ProxyCreationEnabled = false; //var a = db.Genders.ToArray(); var a = _genderService.GetAll().MapModelToViewModel(); return(Json(a, JsonRequestBehavior.AllowGet)); }
public ActionResult IlanEkle() { var Id = HttpContext.Session.GetInt32("ıd"); if (Id == null) { return(Redirect("~/Account/Login")); } var model = new AdsAddViewModel { Ads = new Ads(), AdsCategory = _categoryService.GetAll(), PetBreed = _petBreedService.GetAll(), PetType = _petTypeService.GetAll(), City = _cityService.GetAll(), Gender = _petGenderSerivce.GetAll(), User = _userService.GetById(Convert.ToInt32(Id)) }; return(View(model)); }
public ActionResult Added() { var bloodGrp = _bloodGroupService.GetAll().Data.ToList(); var gender = _genderService.GetAll().Data.ToList(); var maritalStatus = _maritalStatusService.GetAll().Data.ToList(); var disabilityStatus = _disabilityStatusService.GetAll().Data.ToList(); ViewBag.BloodGrpList = new SelectList(bloodGrp, "KanGrupId", "KanGrubu"); ViewBag.GenderList = new SelectList(gender, "CinsiyetId", "Cinsiyeti"); ViewBag.MaritalStatusList = new SelectList(maritalStatus, "MedeniHalId", "MedeniHali"); ViewBag.DisabilityStatusList = new SelectList(disabilityStatus, "OzelDurumId", "OzelDurumu"); return(View()); }
public IActionResult Edit(int id) { PersonViewModel personViewModel = new PersonViewModel(); try { personViewModel.Person = _repository.Find(id); personViewModel.Genders = _genderService.GetAll(); return(View(personViewModel)); } catch (Exception) { return(RedirectToAction("Index")); } }
private void DropBoxItem() { var workplaceGrp = _workplaceService.GetAll().Data.ToList(); var workplaceHeadquartersGrp = _workplaceHeadquartersService.GetAll().Data.ToList(); var priceTypeGrp = _priceTypeService.GetAll().Data.ToList(); var tisJobCodeGrp = _tisJobCodeService.GetAll().Data.ToList(); var adminStatusGrp = _adminStatusService.GetAll().Data.ToList(); var dailyWorkingTimeGrp = _dailyWorkingTimeService.GetAll().Data.ToList(); var disabilityStatusGrp = _privateStatusService.GetAll().Data.ToList(); var maritalStatusGrp = _maritalStatusService.GetAll().Data.ToList(); var genderGrp = _genderService.GetAll().Data.ToList(); var workingStatusGrp = _workingStatusService.GetAll().Data.ToList(); ViewBag.WorkingStatusGrpList = new SelectList(workingStatusGrp, "IstihtamDurumId", "IstihtamDurumu"); ViewBag.GenderGrpList = new SelectList(genderGrp, "CinsiyetId", "Cinsiyeti"); ViewBag.MaritalStatusGrpList = new SelectList(maritalStatusGrp, "MedeniHalId", "MedeniHali"); ViewBag.DisabilityStatusGrpList = new SelectList(disabilityStatusGrp, "OzelDurumId", "OzelDurumu"); ViewBag.DailyWorkingTimeGrpList = new SelectList(dailyWorkingTimeGrp, "GunlukCalismaSureId", "GunlukCalismaSuresi"); ViewBag.AdminStatusGrpList = new SelectList(adminStatusGrp, "IdarecilikDurumId", "IdarecilikDurumu"); ViewBag.PriceTypeGrpList = new SelectList(priceTypeGrp, "UcretTurId", "UcretTuru"); ViewBag.TisJobCodeGrpList = new SelectList(tisJobCodeGrp, "TisMeslekKodId", "TisMeslekAdi"); ViewBag.WorkplaceGrpList = new SelectList(workplaceGrp, "IsYeriId", "IsYeriAdi"); ViewBag.WorkplaceHeadquartersGrpList = new SelectList(workplaceHeadquartersGrp, "GenelMudurlukId", "GenelMudurluk"); }
public async Task <IEnumerable <GenderDTO> > GetAll() => await _genderService.GetAll();
public async Task <IActionResult> Get() { return(Response(await _service.GetAll())); }
public List <Gender> GetAllGender() { return(_GenderService.GetAll()); }