<div class="form-row">
<div class="col-md-4 form-group">
@Html.EJS().CheckBoxFor(model => model.IsGiaoDucTaiDiaPhuong).Label("Giáo dục tại địa phương").Name("IsGiaoDucTaiDiaPhuong").Render()
</div>
<div class="col-md-4 form-group">
@Html.EJS().CheckBoxFor(model => model.IsDuaVaoCoSoGiaoDuc).Label("Đưa vào cơ sở giáo dục").Name("IsDuaVaoCoSoGiaoDuc").Render()
</div>
<div class="col-md-4 form-group">
@Html.EJS().CheckBoxFor(model => model.IsDangBiTruyTo).Label("Đang bị truy tố").Name("IsDangBiTruyTo").Render()
</div>
</div>
<div class="form-row">
<div class="col-md-4 form-group">
@Html.EJS().CheckBoxFor(model => model.IsAnCoHieuLuc).Label("Án có hiệu lực").Name("IsAnCoHieuLuc").Render()
</div>
<div class="col-md-4 form-group">
@Html.EJS().CheckBoxFor(model => model.IsXoaXuLyHanhChinh).Label("Xóa xử lý hành chính").Name("IsXoaXuLyHanhChinh").Render()
</div>
</div> |
@Html.EJS().Grid("ViPhamTaiPhamGrid").GridLines(Syncfusion.EJ2.Grids.GridLine.Both).DataSource(dataManager =>
{
dataManager.Json(ViewBag.listViPhamTaiPham)
.InsertUrl(ViewBag.InsertUrl).UpdateUrl(ViewBag.UpdateUrl).RemoveUrl(ViewBag.DeleteUrl).Adaptor("RemoteSaveAdaptor");
}).Query("new ej.data.Query().addParams('NguoiChapHanhID', 1)").AllowMultiSorting().AllowSorting().AllowFiltering().ActionComplete("ViPhamTaiPhamActionComplete").Columns(col =>
{
col.Field("ID").HeaderText("ID").IsIdentity(true).IsPrimaryKey(true).Visible(false).Add();
col.Field("NoiDung").HeaderText("Nội dung").Add();
}).ActionBegin("begin").AllowPaging().PageSettings(page => { page.PageCount(3); page.PageSize(5); }).EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Dialog).Template("#NguoiChapHanhChiTietDialogTemplate"); edit.ShowDeleteConfirmDialog(true); }).Toolbar(new List<string>
() { "Add", "Edit", "Delete", "Update", "Cancel", "Search" }).FilterSettings(filter => { filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel); }).Locale("vi").Render()
function begin(e) {
if (e.requestType == "save") {
e.data['IsGiaoDucTaiDiaPhuong'] = e.form.querySelector("#IsGiaoDucTaiDiaPhuong").ej2_instances[0].checked;
e.data['IsDuaVaoCoSoGiaoDuc'] = e.form.querySelector("#IsDuaVaoCoSoGiaoDuc").ej2_instances[0].checked;
e.data['IsDangBiTruyTo'] = e.form.querySelector("#IsDangBiTruyTo").ej2_instances[0].checked;
e.data['IsAnCoHieuLuc'] = e.form.querySelector("#IsAnCoHieuLuc").ej2_instances[0].checked;
e.data['IsXoaXuLyHanhChinh'] = e.form.querySelector("#IsXoaXuLyHanhChinh").ej2_instances[0].checked;
}
} |