public async Task <IActionResult> Create()
        {
            DeviceVM.Groups = await _groupsRepository.GetAll().ToListAsync();

            DeviceVM.Models = await _modelRepository.GetAll().ToListAsync();

            return(View(DeviceVM));
        }
예제 #2
0
 public List <Group> GetAllGroups()
 {
     using (Db.BeginReadOnlyWork())
     {
         return(_groupsRepository.GetAll(g => g.Speciality));
     }
 }
        public async Task <IActionResult> Index()
        {
            var groups = await _groupsRepository.GetAll().ToListAsync();

            GroupVM.Groups = groups;

            ViewBag.Current = "Groups";
            return(View(GroupVM));
        }
예제 #4
0
        public override void GoGoGo()
        {
            var groupNames = _contactsConfiguration.GroupsToMessage;
            var groups     = _groupsRepository.GetAll()
                             .Where(g => groupNames.Any(gn => gn.Equals(g.Name, StringComparison.InvariantCultureIgnoreCase)))
                             .Select(g => g.Id)
                             .ToList();
            var contacts = _contactsRepository.GetAllInGroups(groups).ToList();
            var sender   = new TextMessaging(_textMessagingService);

            SendToMales(sender, contacts, _contactsConfiguration.MaleMessage);
            SendToFemales(sender, contacts, _contactsConfiguration.FemaleMessage);
        }
예제 #5
0
 public IList <Group> GetGroups()
 {
     return(_groupsRepository.GetAll());
 }
예제 #6
0
 public async Task <List <Group> > GetGroups()
 {
     return(await _groupsRepository.GetAll());
 }
예제 #7
0
        /// <summary>
        /// Повертає список груп
        /// </summary>
        /// <returns>Список груп</returns>
        public IEnumerable <GroupsDtoModel> GetGroups()
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap <GroupsModel, GroupsDtoModel>()).CreateMapper();

            return(mapper.Map <IEnumerable <GroupsDtoModel> >(groupsRepository.GetAll()));
        }
 public IEnumerable <GroupsViewModel> GetAll()
 {
     return(_mapper.Map <IEnumerable <GroupsViewModel> >(_groupsRepository.GetAll()));
 }
 public IEnumerable <Group> GetAll([FromRoute] GroupType type)
 {
     return(repository.GetAll(type));
 }
예제 #10
0
        /*
         *
         * public object GetAllAtivos(int pIdEmpresa, int page, int length)
         * {
         *  var EventoContaEntity = _leiloeiroRepository.GetAllAtivos(pIdEmpresa, page, length);
         *  var Registros = _leiloeiroConverter.ParseList(EventoContaEntity);
         *  var TotalRegistros = _leiloeiroRepository.Count(pIdEmpresa);
         *  return new { Registros, TotalRegistros };
         * }
         *
         */

        /// <summary>
        /// Return Groups by CompanyId
        /// </summary>
        /// <param name="pCompanyId"></param>
        /// <param name="pId"></param>
        /// <param name="page"></param>
        /// <param name="length"></param>
        /// <returns></returns>
        public List <GroupsVo> GetAll(int pCompanyId, int pId = 0, int page = 1, int length = 30) =>
        _groupsConverter.ParseList(_groupsRepository.GetAll(pCompanyId, pId, page, length));
예제 #11
0
 public IEnumerable <Group> GetAllGroups()
 {
     return(groupsRepository.GetAll());
 }