Former-commit-id: 14c41a75bbc187fda51b273a6a476bc34293205c Former-commit-id: 359f156fb6f20756d805b3e7c419c5b11eec6e371.0
parent
b9b0583761
commit
416039c437
@ -0,0 +1,7 @@
|
||||
@{
|
||||
var key = (Model as Guid?);
|
||||
if (key.HasValue)
|
||||
{
|
||||
@ViewData.Get(key.Value)
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
@{
|
||||
var htmlClass = "form-control select2bs4 search";
|
||||
var list = (ViewData[ViewData.ModelMetadata.PropertyName + "SelectList"] as SelectList) ?? new SelectList(new List<SelectListItem>());
|
||||
@Html.DropDownList("", list, "请选择", new { @class = htmlClass })
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
using Infrastructure.Application;
|
||||
using IoT.Shared.Application.Domain.Entities;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using UoN.ExpressiveAnnotations.NetCore.Attributes;
|
||||
|
||||
namespace Platform.Application.Models
|
||||
{
|
||||
[Display(Name = "机构用户")]
|
||||
public class EditOrganUserModel : EditModel
|
||||
{
|
||||
[Display(Name = "机构")]
|
||||
[DataType("SelectList")]
|
||||
[Required]
|
||||
public Guid? OrganId { get; set; }
|
||||
|
||||
[Display(Name = "用户")]
|
||||
[DataType("SelectList")]
|
||||
[Required]
|
||||
public Guid? UserId { get; set; }
|
||||
|
||||
[Display(Name = "类型")]
|
||||
[DataType("SelectList")]
|
||||
[Required]
|
||||
public OrganUserType? Type { get; set; }
|
||||
|
||||
[Display(Name = "自定义类型")]
|
||||
[RequiredIf("Type==1000", ErrorMessage = "类型为自定时必须填写此字段")]
|
||||
public string CustomType { get; set; }
|
||||
|
||||
[Display(Name = "默认机构")]
|
||||
public bool? IsDefault { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in new issue