...
Code Block | ||
---|---|---|
| ||
@model RTMR.Web.Portal.Models.ServiceTitleBarViewModel <header> <h2 class="app-name-submenu"><img src="~/Content/Images/file.svg" class="iconImg" alt="" /> @Model.Title</h2> </header> @if (Model.TitleBarButtons!=null &&Model.TitleBarButtons.Any()) { <hr class="home-hr" /> <div class="row"> @foreach (var menuBar in Model.TitleBarButtons) { <div class="col-md-4"> <a href="@menuBar.Link" class="@Html.Raw(menuBar.IsPrimary ? "btn btn-primary" : "btn btn-default active") btn-lg btn-block">@menuBar.Text</a> </div> } </div> } |
Add to view
Inside your view add the following line:
...
In your view model add the following property:
Code Block | ||
---|---|---|
| ||
public ServiceTitleBarViewModel ServiceTitleBar { get; set; } |
...
Inside your controller you can set the view models ServiceTitleBar property to set the Title, TitleBarButtons with associated text and links.
...
In your view model add the following property:
Code Block | ||
---|---|---|
| ||
public WizardViewModel Wizard |
...
Add WizardStepState
In your Models folder add an Enum called WizardStepState.
Code Block | ||
---|---|---|
| ||
public enum WizardStepState {
NotAccessed,
Completed,
Incomplete,
InProgress,
Inapplicable,
Summary
}
|
Add WizardStepViewModel
In your Models folder add a new view model called WizardStepViewModel.
...
In case you want to get the feedback in a middle of your view you only need following
...
Code Block |
---|
@Html.Partial("_rating", new string[] {"rating", Model.Rating.ToString()}) |
...
If you want a feedback in a Dialog then inside your view add the following
...
Property | Description |
Task<Invoice> Add(Invoice invoice); | Adds a new invoice. |
Task<Invoice> Update(Invoice invoice); | Updates an existing invoice. |
Task<ICollection<Invoice>> GetByServiceRequest(int serviceRequestId); | Searches invoices based on a service request id. |
Task<Invoice> GetByNumber(string number); | Searches for an invoice based on a number. |
Task<Invoice> GetByPaymentReference(string reference); | Searches for an invoice based on payment reference number. |
...
1.1.3.3 InvoiceManager.Add(Invoice) Method
...
Uploads a new file attachment to the database.
Code Block | ||
---|---|---|
| ||
public async Task<FileAttachment> Upload(FileAttachment fileAttachment) |
How to create a new file attachment. The file attachment id isn’t required, since it gets generated automatically.const int serviceRequestId = 41;
const string contentType =
Code Block | ||
---|---|---|
| ||
const int serviceRequestId = 41; const string contentType = "image/jpeg"; |
...
byte[] |
...
bytes = byte array const string filename = "images.jpg"; |
...
{
...
var fileAttachment = new FileAttachment { ContentType = contentType, Data = bytes, Name = filename, ServiceRequestId = serviceRequestId, Size = bytes.Length }; var newAttachment = await _attachmentManager.Upload(fileAttachment); |
1.1.4.3 Parameters
FileAttachment (FileAttachment)
Business object used to get/set the values.
...
In this example a file attachment is removed by using its id. The id must be valid.
Code Block | ||
---|---|---|
| ||
await MtoaApi.FileAttachmentApi.Remove(newAttachment.Id); |
1.1.4.15 Parameters
Id (int)
The service request id.
...