public TransactionsController( ITransactionService transactionService, IStatementService statementService) { _transactionService = transactionService; _statementService = statementService; }
public void ProcessRequest(HttpContext context) { IStatementService _statementService = ObjectFactory.GetInstance <IStatementService>(); Guid imageId = Guid.Empty; if (context.Request.QueryString["imageId"] != null) { imageId = new Guid(context.Request.QueryString["imageId"]); } else { throw new ArgumentException("Не указан параметр"); } Content content = _statementService.GetContentRecord(imageId); if (content == null) { throw new ArgumentException("Не существующий ID"); } context.Response.ContentType = "image/jpeg"; context.Response.BinaryWrite(content.ContentInterior /*content.DocumentContent*/); }
public void ProcessRequest(HttpContext context) { IStatementService _statementService = ObjectFactory.GetInstance <IStatementService>(); Guid fileId = Guid.Empty; if (context.Request.QueryString["fileId"] != null) { fileId = new Guid(context.Request.QueryString["fileId"]); } else { throw new ArgumentException("Не указан параметр"); } Content content = _statementService.GetContentRecord(fileId); if (content == null) { throw new ArgumentException("Не существующий ID"); } context.Response.Clear(); context.Response.ClearHeaders(); context.Response.AddHeader("Content-Type", "Application/octet-stream"); context.Response.AddHeader("Content-Length", content.DocumentContent.Length.ToString()); context.Response.AddHeader("Content-Disposition", "attachment; filename=" + content.FileName); context.Response.BinaryWrite(content.ContentInterior /*content.DocumentContent*/); context.Response.Flush(); context.Response.End(); }
public EnrolleeController(IOperatorService operatorService, IEnrolleeService enrolleeService, IStatementService statementService, IStudentStatusService studentStatusService) { _operatorService = operatorService; _enrolleeService = enrolleeService; _statementService = statementService; _studentStatusService = studentStatusService; }
public SummaryPageModel(IStatementService statementService, IWorkService workService, IAccountService accountService) { _accountService = accountService; _statementService = statementService; _workService = workService; }
public async Task <IActionResult> Delete( [FromServices] IStatementService statementService, [FromRoute] Guid id) { await statementService.DeleteStatement(new PrimaryKey(id)); return(RedirectToAction("Index")); }
public async Task <IActionResult> Create( [FromServices] IStatementService statementService, [FromForm] StatementModel input) { await statementService.CreateStatement( new StatementTitle(input.StatementTitle)); return(RedirectToAction("Index")); }
/// <summary> /// The page_ init. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected void Page_Init(object sender, EventArgs e) { statementService = ObjectFactory.GetInstance <IStatementService>(); regulatoryService = ObjectFactory.GetInstance <IRegulatoryService>(); if (!IsPostBack) { FillModeFiling(); FillFormManufacturing(); } }
public CustomerInvoiceController( IStatementService statementService, IJobService jobService, IUserService userService, ILoggingService loggingService) { this.statementService = statementService; this.jobService = jobService; this.userService = userService; this.loggingService = loggingService; }
public HomeController( IPaymentService paymentService, ITimesheetService timesheetService, IStatementService statementService, ILoggingService loggingService) { this.paymentService = paymentService; this.timesheetService = timesheetService; this.statementService = statementService; this.loggingService = loggingService; }
protected void Page_Init(object sender, EventArgs e) { statementService = ObjectFactory.GetInstance <IStatementService>(); regulatoryService = ObjectFactory.GetInstance <IRegulatoryService>(); if (!IsPostBack) { FillInsuredRelation(); FillDocTypeUDL(); } }
public StatementServiceTests() { var logger = new Mock <ILogger>(); _messageSender = new Mock <IMessageSender>(); _unitOfWorkMock = new Mock <IUnitOfWork>(); _studentStatusService = new Mock <IStudentStatusService>(); _markService = new Mock <IMarkService>(); _sut = new StatementService(_unitOfWorkMock.Object, logger.Object, _messageSender.Object, _studentStatusService.Object, _markService.Object); }
public async Task <IActionResult> ChangeStatus( [FromServices] IStatementService statementService, [FromForm] StatusModel input) { await statementService.ChangeStatementStatus( new PrimaryKey(input.StatementId), (StatusCode)input.StatusCode, new StatusComment(input.Comment)); return(RedirectToAction("Edit", "Statement", new { id = input.StatementId })); }
public CarerPaymentController( IPaymentService paymentService, IStatementService statementService, ICarerService carerService, ILoggingService loggingService) { this.paymentService = paymentService; this.statementService = statementService; this.carerService = carerService; this.loggingService = loggingService; }
public async Task <IActionResult> Edit( [FromServices] IStatementService statementService, [FromForm] StatementModel input) { var statement = await statementService.ChangeStatementTitle( new PrimaryKey(input.StatementId), new StatementTitle(input.StatementTitle)); var model = new StatementModel(statement); return(View(model)); }
/// <summary> /// The page_ init. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected void Page_Init(object sender, EventArgs e) { statementService = ObjectFactory.GetInstance <IStatementService>(); regulatoryService = ObjectFactory.GetInstance <IRegulatoryService>(); ddlPolicyType.Items.AddRange( statementService.GetFormManufacturingByCauseFilling(-1) .Select( x => new ListItem( x.Name, x.Id.ToString(CultureInfo.InvariantCulture))) .ToArray()); }
public CustomerPaymentController( IPaymentService paymentService, IStatementService statementService, IJobService jobService, IRenderingService renderingService, IUserService userService, ILoggingService loggingService) { this.paymentService = paymentService; this.statementService = statementService; this.jobService = jobService; this.renderingService = renderingService; this.userService = userService; this.loggingService = loggingService; }
/// <summary> /// The page_ init. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected void Page_Init(object sender, EventArgs e) { statementService = ObjectFactory.GetInstance <IStatementService>(); regulatoryService = ObjectFactory.GetInstance <IRegulatoryService>(); if (!IsPostBack) { FillGender(); FillCategory(); FillDocType(); FillCitizenshipAndBirthPlace(); UpdateCategory(); UpdateDocTypeUdl(); UpdateDocTypeResidency(); } }
public CustomerController( IPaymentService paymentService, IStatementService statementService, ITimesheetService timesheetService, ICarerService carerService, IUserService userService, ILoggingService loggingService) { this.paymentService = paymentService; this.statementService = statementService; this.timesheetService = timesheetService; this.carerService = carerService; this.userService = userService; this.loggingService = loggingService; }
public void Test_GetStatements_BankIds() { _statementRepo.GetStatements().ReturnsForAnyArgs(new List <Statement> { new Statement(new DateTime(2021, 5, 1), "sender", "subject", 100, "bankId1"), new Statement(new DateTime(2021, 5, 2), "sender", "subject", 100, "bankId2"), new Statement(new DateTime(2021, 7, 1), "sender", "subject", 100, "bankId3"), }); _sut = new StatementService(_statementRepo, null, _finTsExecutor); var statements = _sut.GetStatements(new DateTime(2021, 5, 1), new DateTime(2021, 8, 2), "bankId1,bankId3"); statements.Count().Should().Be(2); statements.ToList()[0].Should().BeEquivalentTo(new Statement(new DateTime(2021, 5, 1), "sender", "subject", 100, "bankId1")); statements.ToList()[1].Should().BeEquivalentTo(new Statement(new DateTime(2021, 7, 1), "sender", "subject", 100, "bankId3")); }
/// <summary> /// The page_ init. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected void Page_Init(object sender, EventArgs e) { statementService = ObjectFactory.GetInstance <IStatementService>(); addressService = ObjectFactory.GetInstance <IAddressService>(); if (!IsPostBack) { // Установка типа адресного компонента hfKLADRControlType.Value = GetKLADRControlType().ToString(); switch (GetKLADRControlType()) { case KLADRControlType.Structured: { chbIsFreeMainAddress.Visible = false; chbIsFreeResidencyAddress.Visible = false; mainAddressKladrIntellisenseDiv.Style.Add("display", "none"); mainAddressKladrDiv.Style.Remove("display"); } break; case KLADRControlType.Intellisense: { // Адрес регистрации mainAddressKladrIntellisenseDiv.Style.Remove("display"); mainAddressKladrDiv.Style.Add("display", "none"); mainAddressKladr.Mode = KladrUserControlMode.Free; residencyAddressKladr.Mode = KladrUserControlMode.Free; } break; } //documentRegistration.FillDocumentTypeDdl( // statementService.GetDocumentTypeForRegistrationDocument().Select( // x => new ListItem(x.Name, x.id.ToString(CultureInfo.InvariantCulture))).ToArray(), // null); // Сокрытие адреса проживания residencyAddressLabelDiv.Style.Add("display", "none"); isFreeResidencyAdressDiv.Style.Add("display", "none"); residencyAddressKladrIntellisenseDiv.Style.Add("display", "none"); residencyAddressKladrDiv.Style.Add("display", "none"); } }
public CarerController( IPaymentService paymentService, IStatementService statementService, ITimesheetService timesheetService, IBookingService bookingService, ICarerService carerService, ILoggingService loggingService, IMessagingService messagingService) { this.paymentService = paymentService; this.statementService = statementService; this.timesheetService = timesheetService; this.carerService = carerService; this.loggingService = loggingService; this.messagingService = messagingService; this.bookingService = bookingService; }
public CarerStatementController( IStatementService statementService, ITimesheetService timesheetService, IJobService jobService, IPaymentService paymentService, ICarerService carerService, ILoggingService loggingService, ILifetimeScope scope) { this.statementService = statementService; this.paymentService = paymentService; this.jobService = jobService; this.carerService = carerService; this.timesheetService = timesheetService; this.loggingService = loggingService; this.scope = scope; }
public void ProcessRequest(HttpContext context) { IStatementService _statementService = ObjectFactory.GetInstance <IStatementService>(); //чтение присланного изображения byte[] imageDump = _statementService.ConvertToGrayScale(context.Request.BinaryRead(context.Request.ContentLength)); //запись присланного изображения в базу Content content = null; if (imageDump.Length > 0) { content = _statementService.SaveContentRecord(TypeContent.Foto, imageDump); } //Возврат ссылки на сохраненное изображение context.Response.Clear(); string imageUri = string.Format(@"{0}://{1}:{2}/HttpHandlers/GetPhotoHandler.ashx?imageId={3}", context.Request.Url.Scheme, context.Request.Url.Host, context.Request.Url.Port, content.Id); context.Response.Write(imageUri); }
protected void Page_Init(object sender, EventArgs e) { _service = ObjectFactory.GetInstance <IStatementService>(); regulatory = ObjectFactory.GetInstance <IRegulatoryService>(); }
public AccountStatementController(IStatementService statementService, IStatementDownloadService statementsDownloadService) { _statementService = statementService; _statementsDownloadService = statementsDownloadService; }
public StatementsController(ILogger <StatementsController> logger, IStatementService statementService) { _logger = logger; _statementService = statementService; }
/// <summary> /// The page_ load. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> protected void Page_Load(object sender, EventArgs e) { statementService = ObjectFactory.GetInstance <IStatementService>(); CheckIsRightToEdit(); if (!IsPostBack) { return; } if (CurrentStatement.FormManufacturing == null) { return; } // Пытаемся получить редактируемое заявление, и проверить наличие уже имеющегося полиса ////var _statementService = ObjectFactory.GetInstance<IStatementService>(); ////var tempStatementId = Guid.Empty; // Guid.TryParse(StatementId, out tempStatementId); MedicalInsurance polis = null; if (CurrentStatement.Id != Guid.Empty /* tempStatementId != null*/) { // var statement = _statementService.GetStatement(tempStatementId); if (CurrentStatement != null && CurrentStatement.MedicalInsurances != null) { polis = CurrentStatement.MedicalInsurances.FirstOrDefault(x => x.PolisType.Id != PolisType.В); } } // В случае если полис заказан в составе УЭК, то пользователь может осуществить только операцию // выдачи бумажного полиса string polisType; if (CurrentStatement.FormManufacturing.Id == PolisType.К && chbPolicyIsIssued.Checked && polis == null) { ddlPolicyType.SelectedValue = polisType = PolisType.П.ToString(CultureInfo.InvariantCulture); } else { if (polis != null) { ddlPolicyType.SelectedValue = polisType = polis.PolisType.Id.ToString(CultureInfo.InvariantCulture); } else { ddlPolicyType.SelectedValue = polisType = CurrentStatement.FormManufacturing.Id.ToString(CultureInfo.InvariantCulture); } } hfRequestedPolicyType.Value = polisType; // Дата окончания действия полиса tbPolicyDateEnd.Text = PolisEndDate.ToShortDateString(); if (IsPostBack) { var st = CurrentStatement; MoveDataFromGui2Object(ref st); } }
public StatementController(IStatementService statementService, IMapper mapper) { _mapper = mapper; _statementService = statementService; }
/// <summary> /// Initializes a new instance of the <see cref="TemporaryCertificateReport" /> class. /// </summary> public TemporaryCertificateReport() { InitializeComponent(); securityService = ObjectFactory.GetInstance <ISecurityService>(); statementService = ObjectFactory.GetInstance <IStatementService>(); }