public TenderController(MyDbContext context) { MedicineForTenderingService = new MedicineForTenderingService(context); TenderService = new TenderService(context); MedicineTenderOfferService = new MedicineTenderOfferService(context); PharmacyTenderOfferService = new PharmacyTenderOfferService(context); SmptServerService = new SmptServerService(); }
public IActionResult AcceptPharmacyOffer(int offerId, int tenderId) { TenderOrder tender = PharmacyTenderOfferService.GetPharmacyOffer(offerId, tenderId); SmptServerService.SendEMailNotificationForTender(tender.MedicinesWithQuantity, tender.PharmacyName); TenderService.CloseTender(tender); MedicineTenderOfferService.UpdateMedicineQuantity(offerId); return(Ok()); }
private App() { EmailVerificationService = new EmailVerificationService(); SftpService = new SftpService(); HttpService = new HttpService(); TenderService = new TenderService(); MedicalExaminationService = new MedicalExaminationService( new MedicalExaminationRepository(new MySQLStream <MedicalExamination>(), new IntSequencer())); PatientFeedbackService = new PatientFeedbackService( new PatientFeedbackRepository(new MySQLStream <PatientFeedback>(), new IntSequencer())); MedicalExaminationReportService = new MedicalExaminationReportService( new MedicalExaminationReportRepository(new MySQLStream <MedicalExaminationReport>(), new IntSequencer())); PrescriptionService = new PrescriptionService( new PrescriptionRepository(new MySQLStream <Prescription>(), new IntSequencer())); MedicalRecordService = new MedicalRecordService( new MedicalRecordRepository(new MySQLStream <MedicalRecord>(), new IntSequencer()), EmailVerificationService); QuestionService = new QuestionService( new QuestionRepository(new MySQLStream <Question>(), new IntSequencer())); AnswerService = new AnswerService( new AnswerRepository(new MySQLStream <Answer>(), new IntSequencer()), QuestionService); AllergiesService = new AllergiesService( new AllergiesRepository(new MySQLStream <Allergies>(), new IntSequencer())); PatientService = new PatientService( new PatientRepository(new MySQLStream <Patient>(), new IntSequencer())); SurveyService = new SurveyService( new SurveyRepository(new MySQLStream <Survey>(), new IntSequencer()), MedicalExaminationService, AnswerService); DoctorService = new DoctorService( new DoctorRepository(new MySQLStream <Doctor>(), new IntSequencer())); ReportService = new ReportService( new ReportRepository(new MySQLStream <Report>(), new IntSequencer()), SftpService); DoctorWorkDayService = new DoctorWorkDayService( new DoctorWorkDayRepository(new MySQLStream <DoctorWorkDay>(), new IntSequencer()), DoctorService); SpetialitationService = new SpetialitationService( new SpecialitationRepository(new MySQLStream <Specialitation>(), new IntSequencer())); AppointmentService = new AppointmentService( new AppointmentRepository(new MySQLStream <Appointment>(), new IntSequencer()), PatientService); EPrescriptionService = new EPrescriptionService( new EPrescriptionRepository(new MySQLStream <EPrescription>(), new IntSequencer()), SftpService); PharmacyService = new PharmacyService( new PharmacyRepository(new MySQLStream <Pharmacies>(), new IntSequencer())); RoomService = new RoomService( new RoomRepository(new MySQLStream <Room>(), new IntSequencer())); ManagerService = new ManagerService( new ManagerRepository(new MySQLStream <Manager>(), new IntSequencer())); SecretaryService = new SecretaryService( new SecretaryRepository(new MySQLStream <Secretary>(), new IntSequencer())); SystemAdministratorService = new SystemAdministratorService( new SystemAdministratorRepository(new MySQLStream <SystemAdministrator>(), new IntSequencer())); UserService = new UserService( new UserRepository(new MySQLStream <User>(), new IntSequencer()), PatientService, SystemAdministratorService); }
public TendersController(IOptions <ApplicationSettings> appSettings, IHttpContextAccessor httpContextAccessor, IHostingEnvironment environment, TenderService tenderService, StateService stateSerice, DistrictService districtSerice, DivisionService divisionService) { _appSettings = appSettings; _session = httpContextAccessor.HttpContext.Session; _environment = environment; _tenderService = tenderService; _stateSerice = stateSerice; _districtSerice = districtSerice; _divisionService = divisionService; }
public IActionResult GetTenderById(String id) { return(Ok(TenderService.GetTenderById(Int32.Parse(id)))); }
public IActionResult GetActiveTenders() { return(Ok(TenderService.GetAllActiveTenders())); }
public IActionResult Post(TenderOrder tender) { TenderService.Create(TenderAdapter.TenderToTenderDto(new Tender(DateTime.Parse(tender.Date), false))); MedicineForTenderingService.CreateAllMedicineForTendering(tender); return(Ok()); }
public IActionResult Get() { return(Ok(TenderService.GetAll())); }