Skip to content

Commit

Permalink
不适合对所有字符串所有字段使用文本框
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Dec 30, 2024
1 parent 75dfd40 commit d94d8a2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion NewLife.CubeNC/Areas/Cube/Controllers/AppModuleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ protected override IEnumerable<AppModule> Search(Pager p)
var start = p["dtStart"].ToDateTime();
var end = p["dtEnd"].ToDateTime();

return AppModule.Search(start, end, p["Q"], p);
//return AppModule.Search(start, end, p["Q"], p);
return base.Search(p);
}

private static void ScanAppModule()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ protected override IEnumerable<Attachment> Search(Pager p)

if (p.Sort.IsNullOrEmpty()) p.Sort = AppLog._.Id.Desc();

return Attachment.Search(category, key, ext, start, end, p["Q"], p);
//return Attachment.Search(category, key, ext, start, end, p["Q"], p);
return base.Search(p);
}
}
11 changes: 11 additions & 0 deletions NewLife.CubeNC/Views/Shared/_List_Search.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
var dic = new Dictionary<Int32, String>();
dic[1] = "";
dic[0] = "";

var atts = new Dictionary<String, Object>();
if (!atts.ContainsKey("class")) atts.Add("class", "form-control");

}
@foreach (SearchField field in fields)
{
Expand Down Expand Up @@ -66,6 +70,13 @@
}
}
}
// else if (field.Type == typeof(String))
// {
// <div class="form-group">
// <label for="@name" class="control-label">@field.DisplayName:</label>
// @Html.TextBox(name, page[name], null, atts)
// </div>
// }
}

@if (fi != null)
Expand Down

0 comments on commit d94d8a2

Please sign in to comment.