解决MySql布尔型新旧版本兼容问题,采用枚举来表示布尔型的数据表。由正向工程赋值
大石头 authored at 2018-05-15 21:21:05
532.00 B
X
@using NewLife;
@using XCode;
@using XCode.Configuration;
@{
    var pair = Model as Pair;
    var entity = pair.First as IEntity;
    var item = pair.Second as FieldItem;

    var bs = this.Bootstrap();
    bs.Set(item);
}
@if (item.Name == "Permission")
{
    if (!entity.IsNullKey)
    {
        @Html.Partial("SetPermission", new { Role = entity })
    }
}
else
{
    <div class="form-group col-sm-12 col-md-@bs.GetGroupWidth()">
        @Html.Partial("_Form_Item", new Pair(entity, item))
    </div>
}