예제 #1
0
        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));
        }
예제 #2
0
        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");
        }
예제 #4
0
        public IEnumerable <GenderIndexViewModel> GetGender()
        {
            List <Gender> items = _genderService.GetAll().ToList();

            var models = Mapper.Map <IList <Gender>, IList <GenderIndexViewModel> >(items);

            return(models);
        }
예제 #5
0
        public IQueryable <GenderModel> GetAll()
        {
            //Configuration.Services.GetTraceWriter().Info(Request, "GenderController", "Get the list.");
            var list = _service.GetAll();

            var queryable = list.AsQueryable();

            return(queryable);
        }
예제 #6
0
        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));
        }
예제 #7
0
        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));
        }
예제 #8
0
        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");
        }
예제 #11
0
 public async Task <IEnumerable <GenderDTO> > GetAll() => await _genderService.GetAll();
예제 #12
0
 public async Task <IActionResult> Get()
 {
     return(Response(await _service.GetAll()));
 }
예제 #13
0
 public List <Gender> GetAllGender()
 {
     return(_GenderService.GetAll());
 }