prices
This commit is contained in:
parent
716fa33e90
commit
eed3494a69
|
|
@ -4,6 +4,7 @@
|
|||
@using TIAM.Entities.Drivers
|
||||
@using TIAM.Entities.Users
|
||||
@using TIAM.Models.Dtos.Users
|
||||
@using TIAM.Services
|
||||
@using TIAMWebApp.Shared.Application.Interfaces
|
||||
@using TIAMWebApp.Shared.Application.Services
|
||||
@using TIAMWebApp.Shared.Application.Utility
|
||||
|
|
@ -16,9 +17,9 @@
|
|||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||
@inject AdminSignalRClient AdminSignalRClient;
|
||||
|
||||
<TransferDestinationToProductGrid
|
||||
Logger="_logger"
|
||||
<TransferDestinationToProductGrid Logger="_logger"
|
||||
SignalRClient="AdminSignalRClient"
|
||||
Context="TransferDestinationToProductContext"
|
||||
PageSize="10"
|
||||
ValidationEnabled="false"
|
||||
EditMode="GridEditMode.EditForm"
|
||||
|
|
@ -61,7 +62,34 @@
|
|||
<DxFormLayoutItem Caption="Price3" ColSpanMd="4">
|
||||
@editFormContext.GetEditor("Price3")
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Context="FormLayoutContext" Caption="TransferDestination" ColSpanMd="4">
|
||||
@{
|
||||
var contextId = ((TransferDestinationToProduct)editFormContext.EditModel).Id;
|
||||
TransferDestinationToProduct thisItem = (TransferDestinationToProduct)editFormContext.EditModel;
|
||||
if (Value != null)
|
||||
{
|
||||
thisItem.TransferDestinationId = ((TransferDestination)Value).Id;
|
||||
}
|
||||
}
|
||||
|
||||
<DxDropDownBox @bind-Value="Value"
|
||||
QueryDisplayText="QueryText"
|
||||
DropDownWidthMode="DropDownWidthMode.ContentWidth"
|
||||
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
|
||||
NullText="Select a destination..."
|
||||
InputId="ddbSearchLookup"
|
||||
CssClass="cw-480">
|
||||
<DropDownBodyTemplate>
|
||||
<TransferDestinationGrid Logger="_logger"
|
||||
SignalRClient="AdminSignalRClient"
|
||||
GetAllMessageTag="@SignalRTags.GetAllTransferDestinations"
|
||||
ShowSearchBox="true"
|
||||
SelectedDataItem="@Value"
|
||||
SelectedDataItemChanged="item => GridSelectedDataItemChanged(item, context.DropDownBox)"/>
|
||||
</DropDownBodyTemplate>
|
||||
</DxDropDownBox>
|
||||
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem Caption="Commission rate" ColSpanMd="4">
|
||||
@editFormContext.GetEditor("ProductCommis")
|
||||
</DxFormLayoutItem>
|
||||
|
|
@ -75,6 +103,20 @@
|
|||
|
||||
private LoggerClient<TransferDestinationToProductGridComponent> _logger = null!;
|
||||
|
||||
object Value { get; set; }
|
||||
|
||||
string QueryText(DropDownBoxQueryDisplayTextContext arg)
|
||||
{
|
||||
if (arg.Value is TransferDestination value)
|
||||
return value.Id.ToString();
|
||||
return string.Empty;
|
||||
}
|
||||
void GridSelectedDataItemChanged(object item, IDropDownBox dropDownBox)
|
||||
{
|
||||
Value = item as TransferDestination;
|
||||
dropDownBox.HideDropDown();
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
_logger = new LoggerClient<TransferDestinationToProductGridComponent>(LogWriters.ToArray());
|
||||
|
|
|
|||
Loading…
Reference in New Issue