/// <summary> /// Populates All Lookup Fields In The Set Of IRecords With The Name Of The Referenced Record /// Used If The IRecordService Has Not Loaded The Name Of Referenced Records /// </summary> /// <param name="records">Records To Load The Names Into Lookup Fields</param> /// <param name="service">Service To Retrieve The Record Names</param> /// <param name="ignoreType">Types To Not Load The Name</param> public static void PopulateEmptyLookups(this IEnumerable <IRecord> records, IRecordService service, IEnumerable <string> ignoreType) { var emptyLookupNames = new Dictionary <string, List <Lookup> >(); foreach (var record in records) { foreach (var field in record.GetFieldsInEntity()) { if (!field.IsNullOrWhiteSpace()) { var value = record.GetField(field); if (value is Lookup && ((Lookup)value).Name == null) { if (!emptyLookupNames.ContainsKey(field)) { emptyLookupNames.Add(field, new List <Lookup>()); } emptyLookupNames[field].Add((Lookup)value); } } } } PopulateLookups(service, emptyLookupNames, ignoreType); }
private static void FindReadersByTicket(IReaderService rs, IRecordService recsc) { Console.Clear(); Console.WriteLine("You have chosen finding readers by ticket"); Console.Write("Input ticket number: "); var ticketIn = Console.ReadLine(); if (int.TryParse(ticketIn, out int num)) { var readers = rs.FindReaderByTicket(num); if (readers == null || readers.Count() == 0) { Console.WriteLine("nothing was found"); } else if (readers.Count() > 1) { Console.WriteLine("It seems that there is more than one reader with such ticket number"); } else { var res = readers.FirstOrDefault(); Console.WriteLine("\nResult\n"); Console.WriteLine($"{"Full name",-25} | {"Ticket number",-12} | {"Phone number",-20}"); Console.WriteLine($"{res.Fullname,-25} | {res.TicketNumber,-12} | {res.Phone,-20}"); Console.WriteLine("To see activity choose:\n" + "r - to see returned books\n" + "b - to see currently borrowed books\n" + "any key to return to menu"); var inp = Console.ReadLine(); switch (inp.Trim()) { case "r": case "R": GetReturnedBooks(rs, recsc, res); break; case "b": case "B": GetBorrowedBooks(rs, recsc, res); break; default: return; } } } else { Console.WriteLine("Bad input"); } Console.Write("Press any key to return to menu"); Console.ReadLine(); }
public PickTheDate(IRecordService recordService, IGroupService groupService, UserManager <ApplicationUser> userManager) { _recordService = recordService; _groupService = groupService; _userManager = userManager; }
public CrudDialog(IDialogController dialogController, IRecordService recordService) : base(dialogController) { RecordService = recordService; //this is so that the completion screen isnt loaded when the dialog completes //this dialog just loads the query into the ui and does not have a 'completion' OverideCompletionScreenMethod = () => { }; }
private void CreateSubject() { _unitOfWork.Records.Returns(Substitute.For <IRecordRepository>()); _unitOfWork.Records.Get(_recordId).Returns(new RecordDo { RecordId = _recordId }); _subject = new RecordService(_unitOfWork); }
// Dependency injection public RecordController(IRecordService recordService, IUserService userService, IProjectService projectService, IStringLocalizer <SharedResource> sharedLocalizer) { this.service = recordService; this.users = userService; this.projects = projectService; _sharedLocalizer = sharedLocalizer; }
public Importer(IMapping mapping, IFileSystem fileSystem, IRecordService recordService, IVocabularyService vocabularyService, UserInfo userInfo) { this.mapping = mapping; this.fileSystem = fileSystem; this.recordService = recordService; this.vocabularyService = vocabularyService; this.userInfo = userInfo; }
public RecordController(IRecordService recordService, IRecordPagingService <RecordOverallDTO, Record> recordPagingService, IRecordDetailsService <RecordDetailsDTO> recordDetailsService) { _recordService = recordService; _recordPagingService = recordPagingService; _recordDetailsService = recordDetailsService; }
public ObjectEntryDialog(object objectsToEnter, DialogViewModel parentDialog, IApplicationController applicationController, IRecordService lookupService, IDictionary <string, IEnumerable <string> > optionsetLimitedValues, Action onSave, Action onCancel, string saveButtonLabel = null, string cancelButtonLabel = null, string initialMessage = null) : base(parentDialog, applicationController, lookupService, optionsetLimitedValues, onSave, onCancel: onCancel, saveButtonLabel: saveButtonLabel, cancelButtonLabel: cancelButtonLabel) { InitialMessage = initialMessage; _objectToEnter = objectsToEnter; }
public HomeController(IOlympicEventService eventService, IRecordService recordService, ICompetitorService competitorService, IQuoteService quoteService, IEventBoardService eventBoardService) { _eventService = eventService; _recordService = recordService; _competitorService = competitorService; _quoteService = quoteService; _eventBoardService = eventBoardService; }
public RecordModelService(IRecordMapper mapper, IRecordService service) { if (service == null || mapper == null) { throw new ArgumentNullException("Cannot pass null as argument for AuthorModelService constructor"); } _mapper = mapper; _service = service; }
public PatientController(IUserService userService, IRoleService roleService, IPatientService patientService, ISpecialityService specialityService, IDoctorService doctorService, IRecordService recordService) { this.userService = userService; this.roleService = roleService; this.patientService = patientService; this.specialityService = specialityService; this.doctorService = doctorService; this.recordService = recordService; }
public SummaryItem(string typeSchemaName, string typeLabel, string matchedFieldSchemaName, string matchedField, IEnumerable <string> ids, IRecordService recordService) { RecordTypeSchemaName = typeSchemaName; RecordType = typeLabel; MatchedFieldSchemaName = matchedFieldSchemaName; MatchedField = matchedField; Ids = ids; RecordService = recordService; }
public CreateRecordCommandHandler( IMapper mapper, IRecordService recordService, IAesCryptoProviderService aesCryptoProviderService) { _mapper = mapper; _recordService = recordService; _aesCryptoProviderService = aesCryptoProviderService; }
public CachedPicklist(IEnumerable <IRecord> picklist, IEnumerable <Condition> conditions, IRecordService lookupService) { { Picklist = picklist; Conditions = conditions; LookupService = lookupService; } }
protected AppSettingsDialog(DialogViewModel parentDialog, IRecordService lookupService, TSettingsObject objectToEnter) : base(parentDialog) { SettingsObject = objectToEnter; var configEntryDialog = new ObjectEntryDialog(SettingsObject, this, ApplicationController, lookupService, null, OnSave, null, saveButtonLabel: "Next"); SubDialogs = new DialogViewModel[] { configEntryDialog }; }
public JoinsViewModel(string recordType, IRecordService recordService, IApplicationController controller, Action onConditionSelectedChanged) : base(controller) { OnConditionSelectedChanged = onConditionSelectedChanged; RecordType = recordType; RecordService = recordService; Joins = new ObservableCollection <JoinViewModel>(); AddNewJoin(); }
public HighScoreForm() { InitializeComponent(); recordService = new RecordService(); recordsListBox.DataSource = recordService.GetRecords().OrderByDescending(r => r.Score).ToList(); recordsListBox.DisplayMember = "Info"; }
public AdminController(IConfigService configService, IEmpService empService, IWebHostEnvironment webHostEnvironment, IPrizeService prizeService, IRecordService recordService) { _recordService = recordService; _webHostEnvironment = webHostEnvironment; _prizeService = prizeService; _empService = empService; _configService = configService; }
public TextSearchService(IRecordService service, ITextSearchSettings settings, DocumentWriter.DocumentWriter documentWriter, RecordExtractService recordExtractService) { Service = service; Settings = settings; DocumentWriter = documentWriter; RecordExtractService = recordExtractService; }
public SearchService( IRecordService recordService, UserManager <User> userManager, IHttpContextAccessor accessor) { _recordService = recordService; _userManager = userManager; _accessor = accessor; }
public RecordController(IAccountService accountService, IRecordService recordService, IMapper mapper) { _mapper = mapper; _accountService = accountService; _recordService = recordService; }
private static IEnumerable<string> GetValidFields(string recordType, IRecordService lookupService) { var invalidFieldTypes = new[] { RecordFieldType.ActivityParty, RecordFieldType.Unknown, RecordFieldType.Virtual, RecordFieldType.Image }; return lookupService .GetFieldMetadata(recordType) //.Where(f => f.Searchable) .Where(f => !invalidFieldTypes.Contains(f.FieldType)) .Select(f => f.SchemaName) .ToArray(); }
public static string GetPicklistLabel(this IRecordService recordService, string fieldName, string recordType, string value) { var options = recordService.GetPicklistKeyValues(fieldName, recordType, null, null); if (options.Any(o => o.Key == value)) { return(options.First(o => o.Key == value).Value); } return(value); }
public static IEnumerable <GridFieldMetadata> GetGridFields(this IRecordService recordService, string recordType, ViewType preferredViewType) { var view = GetView(recordService, recordType, preferredViewType); return(view .Fields .Select(f => new GridFieldMetadata(f)) .ToArray()); }
protected AppSettingsDialog(IDialogController dialogController, IRecordService lookupService, TSettingsObject objectToEnter) : base(dialogController) { SettingsObject = objectToEnter; var configEntryDialog = new ObjectEntryDialog(SettingsObject, this, ApplicationController, lookupService, null, OnSave, null); SubDialogs = new DialogViewModel[] { configEntryDialog }; }
public static IMany2ManyRelationshipMetadata GetManyRelationshipMetadata(this IRecordService recordService, string name, string recordType) { var match = recordService.GetManyToManyRelationships(recordType).Where(r => r.SchemaName == name); if (!match.Any()) { throw new NullReferenceException(string.Format("No {0} relationship for type {1} has name {2}", typeof(IMany2ManyRelationshipMetadata).Name, recordType, name)); } return(match.First()); }
public MesService(IMesLineRepository meslineRepository, IMesOrgRepository mesOrgRepository, IMesDeptRepository mesDeptRepository, ISettingArticleDateTimeRangeRepository iSettingTimeRepository, IMesMoRepository mesMoRepository, IRecordService iRecordService, IRecordDetailService iRecordDetailService) { _mesLineRepository = meslineRepository; _mesDeptRepository = mesDeptRepository; _mesOrgRepository = mesOrgRepository; _iSettingTimeRepository = iSettingTimeRepository; _mesMoRepository = mesMoRepository; _iRecordService = iRecordService; _iRecordDetailService = iRecordDetailService; }
public RecordController(IRecordService recordService, IClientService clientService, IProcedureService procedureService, IProductService productService) { _recordService = recordService; _clientService = clientService; _procedureService = procedureService; _productService = productService; }
public Seeder(IDocumentSession db, IRecordService recordService) { this.db = db; this.recordService = recordService; userInfo = new UserInfo { DisplayName = "Guest", Email = "*****@*****.**" }; }
public RecordsController(IRecordService service, IDocumentSession db, IUserContext user) { this.service = service; this.db = db; this.user = user; }
public Program(IRecordService recordService) { _recordService = recordService; }
public RecordController(IRecordService recordService) { this.RecordService = recordService; this.AddDisposableObject(recordService); }
public Seeder(IDocumentSession db, IRecordService recordService) { this.db = db; this.recordService = recordService; }