public CircuitConfigurationController(ILookupService lookupService, ICircuitConfigurationService CircuitConfigurationService, ICircuitService CircuitService, IUserService UserService) { this.lookupService = lookupService; this.CircuitConfigurationService = CircuitConfigurationService; this.CircuitService = CircuitService; this.UserService = UserService; }
static ServiceContainer() { if (Environment.AppSettings.DemoMode) { /* * UserService = new Mock.UserService(); * StatusService = new Mock.SettingsService(); * AlertService = new Mock.AlertService(); * DeviceService = new Mock.DeviceService(); * SensorService = new Mock.SensorService(); * StationService = new Mock.StationService(); * CircuitService = new Mock.CircuitService(); * ProgramService = new Mock.ProgramService(); */ } else { UserService = new UserService(); StatusService = new SettingsService(); AlertService = new AlertService(); DeviceService = new DeviceService(); SensorService = new SensorService(); StationService = new StationService(); CircuitService = new CircuitService(); ProgramService = new ProgramService(); PivotService = new StartPivotDeviceService(); } }
public RollController(IUserService userService, IRollService RollService, ICircuitService CircuitService, ICircuitMembersService CircuitMembersService) { this.userService = userService; this.RollService = RollService; this.CircuitService = CircuitService; this.CircuitMembersService = CircuitMembersService; }
public SearchCaseController(ISearchCasesService SearchServiceObj, ILookupService lookupService, ICircuitService circuitService,ICrimeCaseService caseService) { this.SearchServiceObj = SearchServiceObj; this.lookupService = lookupService; this.circuitService = circuitService; this.caseService = caseService; }
public OpenRollController(IUserService userService, ISessionService SessionService, IRollService RollService, ICircuitService CircuitService, IProsecutorService ProsecutorService, ILookupService lookupService) { this.SessionService = SessionService; this.userService = userService; this.RollService = RollService; this.CircuitService = CircuitService; this.ProsecutorService = ProsecutorService; this.LookupService = lookupService; }
public CaseConfugurationController(ILookupService lookupService, ICircuitService circuitService, ICaseConfiguration caseSessionsService, ISearchCasesService searchCasesService, IRollService RollService, ISessionService SessionService) { this.lookupService = lookupService; this.circuitService = circuitService; this.caseSessionsService = caseSessionsService; this.searchCasesService = searchCasesService; this.RollService = RollService; this.SessionService = SessionService; }
public MinutesOfSessionController(ICircuitService CircuitService, IDefectsService DefectsService, ISessionService SessionService, ILookupService LookupService, ITextPredectionsService TextPredectionsService, ICrimeCaseService CaseService, ICircuitMembersService CircuitMembersService) { this.DefectsService = DefectsService; this.SessionService = SessionService; this.LookupService = LookupService; this.TextPredectionsService = TextPredectionsService; this.CaseService = CaseService; this.CircuitMembersService = CircuitMembersService; this.CircuitService = CircuitService; }
public SessionValidator( ICircuitService CircuitService, ICaseConfiguration CaseConfiguration) { this.CircuitService = CircuitService; this.CaseConfiguration = CaseConfiguration; RuleFor(Session => Session.Circuit_ID) .NotEmpty() .WithErrorCode(ErrorCode.EmptyCircuitID.ToString()); RuleFor(Session => Session.Circuit_ID) .Must(CheckCircuitIDExist) .WithErrorCode(ErrorCode.InvalidCircuitID.ToString()); RuleFor(Session => Session.Session_Date) .NotEmpty() .WithErrorCode(ErrorCode.EmptySessionDate.ToString()); RuleFor(Session => Session.Session_Date) .Must(CheckFirstSessionExist) .WithErrorCode(ErrorCode.InvalidSessionDate.ToString()); RuleFor(Session => Session.Reservation_Code) .NotEmpty() .WithErrorCode(ErrorCode.EmptyReservationCode.ToString()); }
public CircuitListViewModel(ICircuitService circuitService) { _circuitService = circuitService; LoadDriversAsync(); }
public CircuitController(ICircuitService service) { _circuitService = service; }
public TextPredectionsController(ITextPredectionsService TextPredectionsService, ILookupService LookupService, ICircuitService CircuitService) { this.TextPredectionsService = TextPredectionsService; this.LookupService = LookupService; this.CircuitService = CircuitService; }
public CircuitListViewModel(ICircuitService circuitService, INavigationService navigationService) { _circuitService = circuitService; _navigationService = navigationService; }
public CaseBaseValidator( CasePartyValidator casePartyValidator, CaseDescriptionValidator caseDescriptionValidator, ILookupService LookupService, ICircuitService CircuitService, ICaseConfiguration CaseConfiguration) { this.LookupService = LookupService; this.CircuitService = CircuitService; this.CaseConfiguration = CaseConfiguration; #region CaseBasicData Validator RuleFor(Case => Case.Business_Case_Id) .NotEmpty() .WithErrorCode(ErrorCode.EmptyProsCaseID.ToString()); RuleFor(Case => Case.Court_ID) .NotEmpty() .WithErrorCode(ErrorCode.EmptyCourtID.ToString()) .DependentRules(() => { RuleFor(Case => Case.Court_ID) .Must(CheckCourtIDExist) .WithErrorCode(ErrorCode.InvalidCourtID.ToString()); }); RuleFor(Case => Case.CrimeID) .NotEmpty() .WithErrorCode(ErrorCode.EmptyCrimeID.ToString()) .DependentRules(() => { RuleFor(Case => Case.CrimeID) .Must(CheckCrimeIDExist) .WithErrorCode(ErrorCode.InvalidCrimeID.ToString()); }); RuleFor(Case => Case.ProcedureTypeID) .NotEmpty() .WithErrorCode(ErrorCode.EmptyProcedureTypeID.ToString()) .DependentRules(() => { RuleFor(Case => Case.ProcedureTypeID) .Must(CheckProcedureType) .WithErrorCode(ErrorCode.InvalidProcedureTypeID.ToString()); }); RuleFor(Case => Case.CaseTypeID) .NotEmpty() .WithErrorCode(ErrorCode.EmptyCaseTypeID.ToString()) .DependentRules(() => { RuleFor(Case => Case.CaseTypeID) .Must(CheckCaseTypeID) .WithErrorCode(ErrorCode.InvalidCaseTypeID.ToString()); }); RuleFor(Case => Case.First_Case_No) .NotEmpty() .WithErrorCode(ErrorCode.EmptyFirstCaseNo.ToString()); RuleFor(Case => Case.First_Case_Police_Station_ID) .NotEmpty() .WithErrorCode(ErrorCode.EmptyFirstPoliceStationID.ToString()) .DependentRules(() => { RuleFor(Case => Case.First_Case_Police_Station_ID) .Must(CheckPoliceStationIDExist) .WithErrorCode(ErrorCode.InvalidFirstPoliceStationID.ToString()); }); RuleFor(Case => Case.First_Case_Year) .NotEmpty() .WithErrorCode(ErrorCode.EmptyFirstCaseYearID.ToString()); #endregion #region CaseDescriptionValidation RuleFor(Case => Case.CaseDescription) .NotNull() .WithErrorCode(ErrorCode.NullCaseDescription.ToString()) .DependentRules(() => { RuleFor(Case => Case.CaseDescription).SetValidator(caseDescriptionValidator); }); #endregion #region CaseParties RuleFor(Case => Case.CaseParties) .NotEmpty() .WithErrorCode(ErrorCode.EmptyCaseParties.ToString()) .DependentRules(() => { RuleFor(Case => Case.CaseParties) .SetCollectionValidator(casePartyValidator); //Check For If Defendant and Victim Exist RuleFor(Case => Case.CaseParties) .Must(CaseParties => CaseParties.Exists(CaseParty => (CaseParty.PartyType == (int)PartyTypes.Victim || CaseParty.PartyType == (int)PartyTypes.VictimAndDefendant))) .WithErrorCode(ErrorCode.VictimDoesntExist.ToString()); RuleFor(Case => Case.CaseParties) .Must(CaseParties => CaseParties.Exists(CaseParty => (CaseParty.PartyType == (int)PartyTypes.Defendant || CaseParty.PartyType == (int)PartyTypes.VictimAndDefendant))) .WithErrorCode(ErrorCode.DefendantDoesntExist.ToString()); RuleFor(Case => Case.CaseParties) .Must(CaseParties => CaseParties.Count > 1) .When(Case => Case.CaseParties.Exists(CaseParty => CaseParty.PartyType == (int)PartyTypes.VictimAndDefendant)) .WithErrorCode(ErrorCode.OnlyOneVictimDefendantExist.ToString()); }); #endregion }