diff --git a/CoreCms.Net.CodeGenerator/CrudTemplete/Controllers/Controller.tpl b/CoreCms.Net.CodeGenerator/CrudTemplete/Controllers/Controller.tpl index 36cd062..9cc3df0 100644 --- a/CoreCms.Net.CodeGenerator/CrudTemplete/Controllers/Controller.tpl +++ b/CoreCms.Net.CodeGenerator/CrudTemplete/Controllers/Controller.tpl @@ -398,6 +398,12 @@ namespace CoreCms.Net.Web.Admin.Controllers //{{field.ColumnDescription}} {{field.DataType}} var {{field.DbColumnName}} = Request.Form["{{field.DbColumnName}}"].FirstOrDefault().ObjectToInt(0); if ({{field.DbColumnName}} > 0) + { + where = where.And(p => p.{{field.DbColumnName}} == {{field.DbColumnName}}); + }{% elsif field.DataType == 'decimal' %} + //{{field.ColumnDescription}} {{field.DataType}} + var {{field.DbColumnName}} = Request.Form["{{field.DbColumnName}}"].FirstOrDefault().ObjectToDecimal(0); + if ({{field.DbColumnName}} > 0) { where = where.And(p => p.{{field.DbColumnName}} == {{field.DbColumnName}}); }{% elsif field.DataType == 'datetime' %}